GithubHelp home page GithubHelp logo

Comments (7)

shacker avatar shacker commented on June 7, 2024

Additional info: I actually use django_cas_ng on two sites, and this problem is only happening on one of them.

Python 2.7 + Django 1.8.2 = broken
Python 3.5 + Django 1.9.1 = working

from django-cas-ng.

nitmir avatar nitmir commented on June 7, 2024

working fine with v3.5.3 + python 2.7 + Django 1.7.7

from django-cas-ng.

shacker avatar shacker commented on June 7, 2024

Hmm, interesting. It definitely broke for me on update. Our implementation is very straightforward - nothing fancy. The only settings I'm using are:

CAS_SERVER_URL = 'https://cas.ourdomain.edu/cas/login'
CAS_ADMIN_PREFIX = '/admin'
CAS_LOGOUT_COMPLETELY = True
CAS_REDIRECT_URL = '/'

If this is a result of a bug elsewhere in our project code, I don't know where to begin to look. Ideas?

from django-cas-ng.

nitmir avatar nitmir commented on June 7, 2024

right now, I really don't known. There is a lot of changes since v3.4.2 (the main one I think being putting all CAS logic in a external lib https://github.com/python-cas/python-cas). I'll try tomorrow on Django 1.8.2 to see if I can reproduce the bug.

from django-cas-ng.

nitmir avatar nitmir commented on June 7, 2024

sorry but I cannot reproduce

mkdir /tmp/testcas
virtualenv /tmp/testcas
. /tmp/testcas/bin/activate
pip install Django==1.8.2
pip install django-cas-ng
cd /tmp/testcas/
django-admin startproject testproject
# setup django-cas-ng by editing testproject/settings.py and testproject/urls.py
django-admin startapp testapp
# add testapp to testproject/settings.py and testproject/urls.py and setup a trivial view

My trivial view is

from django.contrib.auth.decorators import login_required

@login_required
def test(request):
    raise ValueError("username: %s is auth %s" % (request.user, request.user.is_authenticated()))

And it effectively raise my current username and True and not AnonymousUser.
for info :

$ pip freeze
Django==1.8.2
argparse==1.2.1
django-cas-ng==3.5.3
python-cas==1.1.0
six==1.10.0
wsgiref==0.1.2

Just note that your CAS_SERVER_URL should probably be 'https://cas.ourdomain.edu/cas/' without the login but I do not think it really matter as I have tested too with a /login in my CAS url and it worked just fine…

from django-cas-ng.

shacker avatar shacker commented on June 7, 2024

Interesting. Well, thank you very much for investigating! I'm not sure where to begin troubleshooting this one, but at this point it appears to definitely be somehow related to my codebase. I'll close this and leave a comment in the future when I figure it out. Thanks.

from django-cas-ng.

wemeetagain avatar wemeetagain commented on June 7, 2024

I had the same issue,
python 2
Django 1.8
django-cas-ng 3.5.3

Unsure of what exactly the problem was, but commenting/removing the following lines fixed the issue: https://github.com/mingchen/django-cas-ng/blob/master/django_cas_ng/views.py#L64-65

Not saying its a good idea, but it worked for me.

from django-cas-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.