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
<https://django-oauth-toolkit.readthedocs.io/en/latest/resource_server.html#setup-the-resource-server>
.

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: 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 <[email protected]>
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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-rest-framework/93e3dcac-4a34-4cfd-b235-4b46c813f88a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-rest-framework/93e3dcac-4a34-4cfd-b235-4b46c813f88a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Alan Crosswell
Associate VP & CTO

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/CAJaAdZhkP8%3DVAOLfvfFDa%3D%3DLx-0n%3DV%3DouDtqH43yiHa6_LhUww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to