expires_in in response to fetch access token

229 views
Skip to first unread message

Pritha Srivastava

unread,
Apr 22, 2021, 11:43:55 PM4/22/21
to keyclo...@googlegroups.com
Hi All,

What does the "expires_in" field stand for in the response received for the command to fetch an access token. Is it the expiration time of the access token?

The command is:

KC_RESPONSE=$(  \
    curl -k -v -X POST \
    -H "Content-Type:application/x-www-form-urlencoded" \
    -d "scope=openid" \
    -d "grant_type=refresh_token" \
    -d "client_id=$KC_CLIENT" \
    -d "client_secret=$KC_CLIENT_SECRET" \
    -d "refresh_token=$KC_REFRESH_TOKEN" \
    "http://$KC_SERVER/$KC_CONTEXT/realms/$KC_REALM/protocol/openid-connect/token" \
    | jq .
)

And the response is:

{ "access_token": "xxx", "expires_in": 60, "refresh_expires_in": 600, "refresh_token": "xxx", "token_type": "bearer", "id_token": "xxx", "not-before-policy": 0, "session_state": "cbc5e583-2b94-4923-8136-5d932c75dbaf", "scope": "openid profile email" }

Thanks,
Pritha

Schuster Sebastian (IOC/PAU1)

unread,
Apr 23, 2021, 8:23:59 AM4/23/21
to Pritha Srivastava, keyclo...@googlegroups.com

It is, see https://tools.ietf.org/html/rfc6749#section-4.2.2.

 

Best regards,

Sebastian

 

Mit freundlichen Grüßen / Best regards

Dr.-Ing. Sebastian Schuster

Project Delivery Berlin 22 (IOC/PDL22)
Bosch.IO GmbH | Ullsteinstr. 128 | 12109 Berlin | GERMANY | www.bosch.io
Tel. +49 30 726112-485 | Mobil +49 152 02177668 | Telefax +49 30 726112-100 | Threema / Threema Work: MF9VMEAE | Sebastian...@bosch.io


Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/CAPUxKPR53j_xre85tTsnxabEWC4xyk7Cd%3DWTW6czO9H2B-Z28w%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages