Table of Contents

Interface IResourceServerScopeProps

Namespace
Amazon.CDK.AWS.Cognito
Assembly
Amazon.CDK.AWS.Cognito.dll

Props to initialize ResourceServerScope.

public interface IResourceServerScopeProps

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) }
                }
            });

Remarks

ExampleMetadata: infused

Properties

ScopeDescription

A description of the scope.

string ScopeDescription { get; }

Property Value

string

ScopeName

The name of the scope.

string ScopeName { get; }

Property Value

string