Show / Hide Table of Contents

Interface IUserPoolResourceServerOptions

Options to create a UserPoolResourceServer.

Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IUserPoolResourceServerOptions
Syntax (vb)
Public Interface IUserPoolResourceServerOptions
Remarks

ExampleMetadata: infused

Examples
var pool = new UserPool(this, "Pool");

            var readOnlyScope = new ResourceServerScope(new ResourceServerScopeProps { ScopeName = "read", ScopeDescription = "Read-only access" });
            var fullAccessScope = new ResourceServerScope(new ResourceServerScopeProps { ScopeName = "*", ScopeDescription = "Full access" });

            var userServer = pool.AddResourceServer("ResourceServer", new UserPoolResourceServerOptions {
                Identifier = "users",
                Scopes = new [] { readOnlyScope, fullAccessScope }
            });

            var readOnlyClient = pool.AddClient("read-only-client", new UserPoolClientOptions {
                // ...
                OAuth = new OAuthSettings {
                    // ...
                    Scopes = new [] { OAuthScope.ResourceServer(userServer, readOnlyScope) }
                }
            });

            var fullAccessClient = pool.AddClient("full-access-client", new UserPoolClientOptions {
                // ...
                OAuth = new OAuthSettings {
                    // ...
                    Scopes = new [] { OAuthScope.ResourceServer(userServer, fullAccessScope) }
                }
            });

Synopsis

Properties

Identifier

A unique resource server identifier for the resource server.

Scopes

Oauth scopes.

UserPoolResourceServerName

A friendly name for the resource server.

Properties

Identifier

A unique resource server identifier for the resource server.

string Identifier { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Scopes

Oauth scopes.

ResourceServerScope[]? Scopes { get; }
Property Value

ResourceServerScope[]

Remarks

Default: - No scopes will be added

UserPoolResourceServerName

A friendly name for the resource server.

string? UserPoolResourceServerName { get; }
Property Value

string

Remarks

Default: - same as identifier

Back to top Generated by DocFX