You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), # look ma, I'm a provider!
43
-
url(r'^api/hello', ApiEndpoint.as_view()), # and also a resource server!
44
-
)
71
+
url(r'^api/hello', ApiEndpoint.as_view()), # an example resource endpoint
72
+
]
73
+
74
+
You will probably want to write your own application views to deal with permissions and access control but the ones packaged with the library can get you started when developing the app.
45
75
46
76
Since we inherit from `ProtectedResourceView`, we're done and our API is OAuth2 protected - for the sake of the lazy
47
77
programmer.
@@ -51,7 +81,7 @@ Testing your API
51
81
Time to make requests to your API.
52
82
53
83
For a quick test, try accessing your app at the url `/api/hello` with your browser
54
-
and verify that it reponds with a `403` (in fact no `HTTP_AUTHORIZATION` header was provided).
84
+
and verify that it responds with a `403` (in fact no `HTTP_AUTHORIZATION` header was provided).
55
85
You can test your API with anything that can perform HTTP requests, but for this tutorial you can use the online
0 commit comments