File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,26 @@ Grab your access_token and start using your new OAuth2 API:
189
189
# Insert a new user
190
190
curl -H "Authorization: Bearer <your_access_token>" -X POST -d"username=foo&password=bar" http://localhost:8000/users/
191
191
192
+ Some time has passed and your access token is about to expire, you can get renew the access token issued using the `refresh token `:
193
+
194
+ ::
195
+
196
+ curl -X POST -d "grant_type=refresh_token&refresh_token=<your_refresh_token>&client_id=<your_client_id>&client_secret=<your_client_secret>" http://localhost:8000/o/token/
197
+
198
+ Your response should be similar to your first access_token request, containing a new access_token and refresh_token:
199
+
200
+ .. code-block :: javascript
201
+
202
+ {
203
+ " access_token" : " <your_new_access_token>" ,
204
+ " token_type" : " Bearer" ,
205
+ " expires_in" : 36000 ,
206
+ " refresh_token" : " <your_new_refresh_token>" ,
207
+ " scope" : " read write groups"
208
+ }
209
+
210
+
211
+
192
212
Step 5: Testing Restricted Access
193
213
---------------------------------
194
214
You can’t perform that action at this time.
0 commit comments