-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SCIM views with custom authentication mechanisms #78
Comments
Great point. A use case where unauthenticated requests are permitted was not considered when developing this package. Also, a use case where a non-Django (ie. Do you have a suggested implementation? My initial reaction is to abstract away the |
Thank you! That sounds like a reasonable approach. |
#82 still only supports predicates that are a function of |
login_requried was added to
SCIMView.dispatch
in f791a44, marking all requests to the SCIM views required for authentication.This ties with authentication based on the
request.user
object added by Django'sAuthenticationMiddleware
, therefore requiring us to actually have aUser
object representing an authenticated client.This is not necessarily the case when there isn't a corresponding
AUTH_USER_MODEL
that can be associated with the SCIM client.login_required
ensures the presence ofuser
whichis_authenticated
, but it does not have anything to do directly with the views themselves.A current workaround is to create a class preventing to be
AUTH_USER_MODEL
, that implementsis_authenticated
. This breaks type-safety and Django's expectation forrequest.user
. But it would be better if django-scim2 actually supports custom authentication methods for the SCIM views.Additional context can be found here.
The text was updated successfully, but these errors were encountered: