Separating authentication server and resource server.

18 views
Skip to first unread message

Kristoffer Gonzaga

unread,
Jul 4, 2019, 4:15:58 PM7/4/19
to Django REST framework
How to make Authentication and Resource server using django-oauth-toolkit? I am following tutorials but nothing seems to be well explained.

Thanks!

Alan Crosswell

unread,
Jul 5, 2019, 9:46:15 AM7/5/19
to django-res...@googlegroups.com
Have you gotten it working with DOT all in the same server?  Start with that. 

I have not used DOT as an external OAuth2 AS, but only as a client to en external AS that my organization runs. In that case, I had to configure an introspection client and secret.  When using an external DOT instance, you have to configure an access token I believe.

In settings I've added 'oauth2_provider' in INSTALLED_APPS[] and the external AS URL and credentials as shown here.

With DOT, I believe you have to manually provision the introspection client by going to http://127.0.0.1:8000/admin/oauth2_provider/accesstoken/add/ and adding a token and then configure that token in settings.OAUTH2_PROVIDER['RESOURCE_SERVER_AUTH_TOKEN'].

Something like this:
image.png

Note that you'll need to set an expiration date and time that are reasonably far in the future.

On Thu, Jul 4, 2019 at 4:16 PM Kristoffer Gonzaga <kristo...@gmail.com> wrote:
How to make Authentication and Resource server using django-oauth-toolkit? I am following tutorials but nothing seems to be well explained.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/93e3dcac-4a34-4cfd-b235-4b46c813f88a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alan Crosswell
Associate VP & CTO

Reply all
Reply to author
Forward
0 new messages