@Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)", date="2022-12-07T17:24:44.592Z") @Stability(value=Stable) public interface OAuthSettings extends software.amazon.jsii.JsiiSerializable
Example:
UserPool pool = new UserPool(this, "Pool");
ResourceServerScope readOnlyScope = ResourceServerScope.Builder.create().scopeName("read").scopeDescription("Read-only access").build();
ResourceServerScope fullAccessScope = ResourceServerScope.Builder.create().scopeName("*").scopeDescription("Full access").build();
UserPoolResourceServer userServer = pool.addResourceServer("ResourceServer", UserPoolResourceServerOptions.builder()
.identifier("users")
.scopes(List.of(readOnlyScope, fullAccessScope))
.build());
UserPoolClient readOnlyClient = pool.addClient("read-only-client", UserPoolClientOptions.builder()
// ...
.oAuth(OAuthSettings.builder()
// ...
.scopes(List.of(OAuthScope.resourceServer(userServer, readOnlyScope)))
.build())
.build());
UserPoolClient fullAccessClient = pool.addClient("full-access-client", UserPoolClientOptions.builder()
// ...
.oAuth(OAuthSettings.builder()
// ...
.scopes(List.of(OAuthScope.resourceServer(userServer, fullAccessScope)))
.build())
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
OAuthSettings.Builder
A builder for
OAuthSettings |
static class |
OAuthSettings.Jsii$Proxy
An implementation for
OAuthSettings |
| Modifier and Type | Method and Description |
|---|---|
static OAuthSettings.Builder |
builder() |
default List<String> |
getCallbackUrls()
List of allowed redirect URLs for the identity providers.
|
default OAuthFlows |
getFlows()
OAuth flows that are allowed with this client.
|
default List<String> |
getLogoutUrls()
List of allowed logout URLs for the identity providers.
|
default List<OAuthScope> |
getScopes()
OAuth scopes that are allowed with this client.
|
@Stability(value=Stable) @Nullable default List<String> getCallbackUrls()
Default: - ['https://example.com'] if either authorizationCodeGrant or implicitCodeGrant flows are enabled, no callback URLs otherwise.
@Stability(value=Stable) @Nullable default OAuthFlows getFlows()
Default: {authorizationCodeGrant:true,implicitCodeGrant:true}
@Stability(value=Stable) @Nullable default List<String> getLogoutUrls()
Default: - no logout URLs
@Stability(value=Stable) @Nullable default List<OAuthScope> getScopes()
Default: [OAuthScope.PHONE,OAuthScope.EMAIL,OAuthScope.OPENID,OAuthScope.PROFILE,OAuthScope.COGNITO_ADMIN]
@Stability(value=Stable) static OAuthSettings.Builder builder()
OAuthSettings.Builder of OAuthSettingsCopyright © 2022. All rights reserved.