Giter Site home page Giter Site logo

Single Sign Out about django-mama-cas HOT 6 CLOSED

jbittel avatar jbittel commented on August 15, 2024
Single Sign Out

from django-mama-cas.

Comments (6)

jbittel avatar jbittel commented on August 15, 2024

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.

manelclos avatar manelclos commented on August 15, 2024

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.

manelclos avatar manelclos commented on August 15, 2024

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.

jbittel avatar jbittel commented on August 15, 2024

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.

jbittel avatar jbittel commented on August 15, 2024

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.

manelclos avatar manelclos commented on August 15, 2024

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)

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.