Obtain an access token using the authorization_code grant type and save it to the active context. Opens a browser window for the user to authenticate.
uaa get-authcode-token CLIENT_ID -s CLIENT_SECRET --port REDIRECT_URI_PORT [flags]
| Flag | Short | Default | Description |
|---|---|---|---|
--client_secret |
-s |
Client secret | |
--port |
Port on which to run the local callback server. Must match a localhost redirect URI in the client registration. |
||
--scope |
openid |
Comma-separated scopes to request in the token | |
--format |
jwt |
Token format. Available values: jwt, opaque |
| Flag | Short | Description |
|---|---|---|
--verbose |
-v |
Print additional info on HTTP requests |
uaa target https://uaa.example.com
uaa get-client-credentials-token admin -s admin-secret
uaa create-client my-app \
--authorized_grant_types authorization_code \
--redirect_uri http://localhost:9090/** \
--scope openid,cloud_controller.read
uaa get-authcode-token my-app -s my-secret --port 9090
uaa contextUnknown redirect_uri error after signing in:
- The
--portvalue must match ahttp://localhost:PORTentry in the client'sredirect_urilist. Runuaa get-client CLIENT_IDto inspect the registration.
Token does not have expected scopes:
- Check the
scopefield of the client registration. - Verify the user has the correct group memberships.