OAuthFlows
- class aws_cdk.aws_cognito.OAuthFlows(*, authorization_code_grant=None, client_credentials=None, implicit_code_grant=None)
Bases:
object
Types of OAuth grant flows.
- Parameters:
authorization_code_grant (
Optional
[bool
]) – Initiate an authorization code grant flow, which provides an authorization code as the response. Default: falseclient_credentials (
Optional
[bool
]) – Client should get the access token and ID token from the token endpoint using a combination of client and client_secret. Default: falseimplicit_code_grant (
Optional
[bool
]) – The client should get the access token and ID token directly. Default: false
- See:
the ‘Allowed OAuth Flows’ section at https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-idp-settings.html
- ExampleMetadata:
infused
Example:
userpool = cognito.UserPool(self, "UserPool") client = userpool.add_client("Client", # ... o_auth=cognito.OAuthSettings( flows=cognito.OAuthFlows( implicit_code_grant=True ), callback_urls=["https://myapp.com/home", "https://myapp.com/users" ] ) ) domain = userpool.add_domain("Domain") sign_in_url = domain.sign_in_url(client, redirect_uri="https://myapp.com/home" )
Attributes
- authorization_code_grant
Initiate an authorization code grant flow, which provides an authorization code as the response.
- Default:
false
- client_credentials
Client should get the access token and ID token from the token endpoint using a combination of client and client_secret.
- Default:
false
- implicit_code_grant
The client should get the access token and ID token directly.
- Default:
false