Comments (6)
Hmm, did you set AUTHENTICATION_BACKENDS
?
https://github.com/15five/django-scim2/blob/master/demo/root/settings.py#L58-L63
from django-scim2.
Hmm, did you set
AUTHENTICATION_BACKENDS
?https://github.com/15five/django-scim2/blob/master/demo/root/settings.py#L58-L63
I hadn't added that yet. I just did, removed cookies but still receive a 401 - Unauthorized. I'm sure the Bearer token I'm using is still valid.
from django-scim2.
Are you sure you're pointed at the right URL; including trailing slashes, that sort of thing? And your URL routing is updated?
https://github.com/15five/django-scim2/blob/master/src/django_scim/middleware.py#L46-L56
from django-scim2.
Are you sure you're pointed at the right URL; including trailing slashes, that sort of thing? And your URL routing is updated?
https://github.com/15five/django-scim2/blob/master/src/django_scim/middleware.py#L46-L56
Yes pretty sure. This is the urls.py from the root folder in my project:
`from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('api/admin/', admin.site.urls),
path('api/', include('api.urls')),
path('api/scim/v2/', include('django_scim.urls', namespace='scim')),
path('api/o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
path('api/users/', include('users.urls'))
]
`
I have noticed that when I disable SCIMAuthCheckMiddleware and the Cookie-header, I receive a 404 - Not found because it tries to redirect me to the login page in Postman when I try to perform a POST-request, even when I provide the request with a Bearer token. The request URL changes from /api/scim/v2/Users to /api/scim/v2/api/admin/login/?next=/api/scim/v2/Users so the 404 makes sense because it doesn't exist, but I don't get this behaviour with my non-SCIM endpoints.
Somehow requests send to the SCIM-endpoints ignore the Authorization-header, I think?
from django-scim2.
I have managed to solve my issue. I needed to add OAuth2 Token Middleware to my MIDDLEWARE_CLASSES ( 'oauth2_provider.middleware.OAuth2TokenMiddleware'), which solved the problem. I can make requests now with a bearer token to the SCIM endpoints.
from django-scim2.
@Katert which cookie header are you talking about? I am having the same issue but can't solve it with the steps you have.
from django-scim2.
Related Issues (20)
- Implement get_user_model same as get_group_model HOT 8
- Sorting based on modified field not supported in get_many method HOT 2
- asking for username and password when accessing v2/scim/Users HOT 1
- Unable to Decouple the User Model HOT 4
- Use the django ORM for filters instead of a custom SQL query generator
- Incompatibility with django 4 HOT 2
- Not syncing the group members HOT 5
- userName attribute should be case-insensitive, per the RFC HOT 6
- Unauthorized issues HOT 4
- Support SCIM views with custom authentication mechanisms HOT 4
- Move to Pytest
- Re-creating of users HOT 2
- admin's scim_id was changed. HOT 4
- Support SCIM 1.1 Implementations HOT 1
- Extend custom authentication mechanisms to authenticate by request. HOT 2
- Why is `get_queryset_post_processor` not applied to querysets in `_search`? HOT 1
- GitHub Sponsor HOT 8
- ModuleNotFoundError: No module named 'django_scim' HOT 2
- Decouple User model from SCIM attributes? HOT 3
- Filters don't apply to reverse foreign keys.
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-scim2.