Comments (2)
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.
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)
- I'm still having a problem with signing SSO communication (the same problem that was fixed in Issue #25) HOT 20
- Multi-tenant configuration while using JIT provisioning HOT 13
- Question: Encrypted Assertion not unencrypting HOT 5
- Help locating sp metadata URL to provide to Idp HOT 2
- There was no response from SAML client. HOT 4
- CSRF Token Issue HOT 1
- Sorry, you are not allowed to access this app HOT 1
- Getting 1106 Error on Dev Server HOT 13
- Auto created users are missing email when using 'email' as USERNAME_FIELD and are not able to login afterwards HOT 9
- Generated jwt token is not validated in API (djangorestframework-simplejwt) HOT 1
- README contains references to /saml2_auth instead of /sso HOT 1
- CUSTOM_CREATE_JWT and CUSTOM_TOKEN_QUERY have different tokens. HOT 3
- remove the exception handler / improve logging out of the box (esp. when settings.DEBUG=True) HOT 1
- Exception handling not reading the value of `DEBUG` setting HOT 3
- SAML Attributes not passing HOT 2
- Use ruff HOT 1
- Convert `requirements.txt` to `pyproject.toml` HOT 1
- Use uv for package installation HOT 1
- Revamp tooling
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-saml2-auth.