Obtain a new access token using the refresh_token grant type and update the active context.
uaa refresh-token -s CLIENT_SECRET [flags]
| Flag | Short | Default | Description |
|---|---|---|---|
--client_secret |
-s |
Client secret | |
--format |
jwt |
Token format. Available values: jwt, opaque |
| Flag | Short | Description |
|---|---|---|
--verbose |
-v |
Print additional info on HTTP requests |
Refresh tokens are long-lived credentials issued alongside access tokens for authorization_code and password grant clients. Use this command to exchange a refresh token for a new, unexpired access token without requiring the user to re-authenticate.
uaa target https://uaa.example.com
uaa get-password-token cf -s "" -u admin -p admin-secret
uaa context # note the refresh_token
uaa refresh-token -s ""
uaa context # access_token should now be updatedNo refresh_token in active context:
- Implicit grant: Implicit clients cannot maintain secrets and are never issued refresh tokens.
- Authorization code / password grant: The client must include
refresh_tokenin itsauthorized_grant_types. Runuaa get-client CLIENT_IDto verify. - Client credentials grant: Refresh tokens are never issued for
client_credentials. Re-authenticate usingget-client-credentials-tokenat any time.