Comments (6)
Thanks for pointing this out! This ought to resolve the issue, although I don't have a chance to test it against a live client at the moment. If you're able to check it and verify that it works, it would be most appreciated.
from django-mama-cas.
Hi Jason,
I also tried that myself before trying to fix django_cas_ng. I think the problem is that because the body is in xml format (the headers set content_type: text/xml), the application running django_cas_ng will not see the parameter because django will not decode and put it in the POST dictionary, that's why I used request.body (https://docs.djangoproject.com/es/1.9/ref/request-response/#django.http.HttpRequest).
I'll test any solution, right now the production code is just bad patched.
from django-mama-cas.
Hi Jason,
Finally got it working just by modifying django-mama-cas:
- remove text/xml header in models.py:268:
resp = requests.post(self.service,
data={'logoutRequest': request.render_content()}) - remove utf-8 encoding in request.py:62:
return etree.tostring(logout_request)
This was adding the encoding declaration: "" a producing this error on django_cas_ng:
Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
Do you thing these changes can go in?
from django-mama-cas.
Ah! I didn't think about that yesterday when I made that change. Yes, I'll make those changes as well.
Thanks!
from django-mama-cas.
I pushed up 1377158 which implements the changes you listed above. Please let me know if you continue to run into problems for some reason. Thanks for your help in reporting this and tracking down the solution!
from django-mama-cas.
Tested django-mama-cas git version against django-cas-ng==3.5.3, works perfect! Thanks a lot!
from django-mama-cas.
Related Issues (20)
- /cas/validate returns no
- Signup and password reset? HOT 2
- ImportError: cannot import name 'python_2_unicode_compatible' HOT 1
- build pip package please HOT 4
- django 3.1.5 - cannot import name 'python_2_unicode_compatible' HOT 2
- django-mama-cas and python-social-auth HOT 2
- Allow service backends to have access to the current request or user
- Allow services to decide if a request should be warned (`warn_user`)
- Django 4.2 support HOT 1
- How does djang_mama_cas solve the problem of implementing single sign out
- Custom Username CAS
- Single logout should raise on request failure HOT 1
- Single logout breaks with multiple sessions HOT 2
- Why is this code in models. py not executed when logout? HOT 3
- About the βexpireβ of ST Model HOT 1
- Question: Adding Two-Factor Auth HOT 1
- Still active? HOT 9
- Do MAMA_CAS_USER_ATTRIBUTES and MAMA_CAS_PROFILE_ATTRIBUTES work? HOT 4
- Sign on without ticket generation HOT 10
- Single Sign Out sometime can't work normally with error "Connection reset by peer" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mama-cas.