@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.674Z") @Stability(value=Stable) public class OAuthScope extends software.amazon.jsii.JsiiObject
Example:
UserPool pool = new UserPool(this, "Pool");
pool.addClient("app-client", UserPoolClientOptions.builder()
.oAuth(OAuthSettings.builder()
.flows(OAuthFlows.builder()
.authorizationCodeGrant(true)
.build())
.scopes(List.of(OAuthScope.OPENID))
.callbackUrls(List.of("https://my-app-domain.com/welcome"))
.logoutUrls(List.of("https://my-app-domain.com/signin"))
.build())
.build());
| Modifier and Type | Field and Description |
|---|---|
static OAuthScope |
COGNITO_ADMIN
Grants access to Amazon Cognito User Pool API operations that require access tokens, such as UpdateUserAttributes and VerifyUserAttribute.
|
static OAuthScope |
EMAIL
Grants access to the 'email' and 'email_verified' claims.
|
static OAuthScope |
OPENID
Returns all user attributes in the ID token that are readable by the client.
|
static OAuthScope |
PHONE
Grants access to the 'phone_number' and 'phone_number_verified' claims.
|
static OAuthScope |
PROFILE
Grants access to all user attributes that are readable by the client Automatically includes access to `OAuthScope.OPENID`.
|
| Modifier | Constructor and Description |
|---|---|
protected |
OAuthScope(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
OAuthScope(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static OAuthScope |
custom(String name)
Custom scope is one that you define for your own resource server in the Resource Servers.
|
String |
getScopeName()
The name of this scope as recognized by CloudFormation.
|
static OAuthScope |
resourceServer(IUserPoolResourceServer server,
ResourceServerScope scope)
Adds a custom scope that's tied to a resource server in your stack.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final OAuthScope COGNITO_ADMIN
@Stability(value=Stable) public static final OAuthScope EMAIL
Automatically includes access to OAuthScope.OPENID.
@Stability(value=Stable) public static final OAuthScope OPENID
@Stability(value=Stable) public static final OAuthScope PHONE
Automatically includes access to OAuthScope.OPENID.
@Stability(value=Stable) public static final OAuthScope PROFILE
protected OAuthScope(software.amazon.jsii.JsiiObjectRef objRef)
protected OAuthScope(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static OAuthScope custom(@NotNull String name)
The format is 'resource-server-identifier/scope'.
name - This parameter is required.@Stability(value=Stable) @NotNull public static OAuthScope resourceServer(@NotNull IUserPoolResourceServer server, @NotNull ResourceServerScope scope)
server - This parameter is required.scope - This parameter is required.@Stability(value=Stable) @NotNull public String getScopeName()
Copyright © 2022. All rights reserved.