Logout
Use this operation to log out a user by removing their browser session,
invalidating the associated refresh token,
and removing the user session in our session repository.
This endpoint required an ID token (who can be expired) into id_token_hint
.
A post_logout_redirect_uri
may be specified to redirect the browser after the logout has been performed. Otherwise, the browser is redirected to a sucess page.
The post_logout_redirect_uri
must be registred to the client_id include in the ID token. Contact us for add it to your configuration.
LogOut Endpoint
GET
|
https://api-global.decathlon.net/connect/openid/logout
|
Parameters :
Parameter |
Description |
Required |
id_token_hint |
Token of the user to logout. An expired ID token is accepted. |
Yes |
post_logout_redirect_uri |
Location to redirect to after the logout. URI must match a value configured on cient_id
|
No |
state |
An optional value that is returned as query parameter on the redirect to post_logout_redirect_uri
|
NO |
Examples
This request initiates a logout and will redirect to the sucess page.
GET
|
https://api-global.decathlon.net/connect/openid/logout?id_token_hint={id_token_hint}
|
This request initiates a logout and will redirect to the
post_logout_redirect_uri
page.
GET
|
https://api-global.decathlon.net/connect/openid/logout?id_token_hint={id_token_hint}&post_logout_redirect_uri={post_logout_redirect_uri}&state={state}
|
curl -X POST \
'https://api-eu.preprod.decathlon.net/connect/openid/logout' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'post_logout_redirect_uri=https://api-eu.preprod.decathlon.net/connect/oauth/mock_redirect_uri' \
--data-urlencode 'id_token_hint=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJiNjI2ZGM2YS0wOTQwLTQ0ZGEtYWY2OS0wNGI0MTFhMWRlNTYiLCJhdWQiOlsiZGtjb25uZWN0Il0sImF6cCI6ImRrY29ubmVjdCIsImF1dGhfdGltZSI6MTY5OTI1OTE2OSwiaXNzIjoiaHR0cHM6Ly9hcGktZXUucHJlcHJvZC5kZWNhdGhsb24ubmV0L2Nvbm5lY3QiLCJsb2NhdGlvbiI6IkZSIiwiZXhwIjoxNzkwNzM0NzYzLCJpYXQiOjE2OTkyNTk5MzMsImp0aSI6IklELlhTNWdHMnNNZmd6LW1HQ3gyai05UlZRSlR6NCIsInNpZCI6ImRkMmJhOGYyLTgwN2ItNGZiNy05MzYwLTFjMmQ4ZjQ5MjFhZSJ9.SQsFVHnnO0sGL_4a_FnSz6duIcdUd-zyPF4Z0W9Iqxo9lPg9la4dmT16cTvln4bzkWAo3et93wtXRBzDWtQiIO6oc47jNo4XTG2rZIW6wy3XPGJ-NjulzZkxOabg1hxrKh8d7lpw4mn4ru8b5woR1WpoU7Drza55uH70lKJOwL43e1nM8Q_vHBNOAlybkEUO-e00c30q1f3J9PzInoXsd6kYO462stMJyxDokFbjUWcore1EP_rLewUYqAVHzU0qazA9qOGrfOO4N3teQnnvU85xa_S-6zmMr8A3iD2PgbQuJWeSVzpNftHSVcupPJbpFmrLeYoSY5YXMtNJUNQGxQ'
Response
HTTP 302 Found Location
|
{post_logout_redirect_uri}&state={state}
|