Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit bd975e8

Browse files
authored
Merge pull request #148 from melanger/patch-1
docs: add prompt to refresh token requirements
2 parents 6843559 + 422a271 commit bd975e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/source/contents/usage.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ We can even test the single logout
5252
Refresh token
5353
-------------
5454

55-
Here an example about how to refresh a token.
56-
It is important to consider that only scope=offline_access will get a usable refresh token.
55+
To obtain a refresh token, you have to use `response_type=code`, add `offline_access` to `scope` and also use `prompt=consent`, otherwise there will be an error (based on [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.11)).
56+
57+
To refresh a token:
5758

5859

5960
import requests
@@ -73,7 +74,7 @@ It is important to consider that only scope=offline_access will get a usable ref
7374
'https://127.0.0.1:8000/oidcop/token', verify=False, data=data, headers=headers
7475
)
7576

76-
oidc-op will return a json response like this::
77+
oidc-op will return a json response like this:
7778

7879
{
7980
'access_token': 'eyJhbGc ... CIOH_09tT_YVa_gyTqg',

0 commit comments

Comments
 (0)