-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Integration with Django Rest Framework #21
Comments
So I implemented a Custom Authentication in Django Rest Framework backend this way :
What I did next :
I still encounter one problem : Do you have any idea of where this is coming from ? |
Authentication for Django Rest Framework (DRF) is not supported at the moment but it's on my todo list. Authentication also works a bit different in DRF and you indeed need a custom authentication class. But you cannot just call But for DRF you should send the actual access token with every API request and verify/authenticate it each time. Redirecting the user to ADFS is also not the way to go for REST APIs. Because the "clients" are javascript code or other machines/system not knowing what to do with that redirect and expecting some 4xx HTTP code. Still it is possible and we do it ourselves, but not with the current code base of django-auth-adfs... |
Thanks @jobec for these details !
It's not clear to me how I could manage this last step. Would you share other insights on how I could accomplish this flow? |
If everything remains within the same domain, it should work. You need to use the way you configured it now and have the user authenticated and a session created. |
@jobec thanks it's working properly! |
@jobec , do you have any status on this? We've currently implemented ADFS on Django, but now I need to lock down the APIs in DRF too. Any suggestions on how this should be done / release date on your solution? |
Also interested in a follow up on this. Is it possible to reopen? Is the project still ongoing? |
This has been implemented already quite some time ago https://django-auth-adfs.readthedocs.io/en/latest/rest_framework.html |
Hi,
I am glad I found your project because I kinda struggling to set an authentication flow with one of my client's ADFS.
I developed a web app with Vue JS & Django Rest Framework.
I wondered if you would have some insights to share about making Django Rest Framework & Django Auth ADFS work together.
Thanks !
The text was updated successfully, but these errors were encountered: