Giter VIP home page Giter VIP logo

Comments (2)

giuseppenovielli avatar giuseppenovielli commented on May 20, 2024 1

Hi @mostafa,
thanks for your response.

I found a workaround:

1)Set USE_JWT = False into settings

2)into root url_patters set

urlpatterns = [

#WEB
path(r"acs/", django_saml2_auth.views.acs, name="acs"),
path(r"login/", django_saml2_auth.views.signin, name="login"),

#SPA
path(r"acs-token/", users.views_grafana_saml2.acs, name="acs-token"),
path(r"login-token/", users.views_grafana_saml2.signin, name="login-token"),
]

3)Into users.views_grafana_saml2 copy django_saml2_auth.views.acs and django_saml2_auth.views.signin methods.
4)Into users.views_grafana_saml2.acs FORCE TO USE JWT TOKEN, ALWAYS.

from django-saml2-auth.

mostafa avatar mostafa commented on May 20, 2024

Hey @giuseppenovielli,

AFAIK, django settings are static, so there seems to be no way around it. You can't mix these two: SPA with Django login, or let the user switch this on and off via a parameter. I was going to suggest changing this in the TRIGGER.BEFORE_LOGIN hook function, but a copy of the settings.SAML2_AUTH is always received by dictor while setting the use_jwt variable, hence changing it inside that hook has no effect.

from django-saml2-auth.

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.