Show / Hide Table of Contents

Class UserPoolResourceServer

Defines a User Pool OAuth2.0 Resource Server.

Inheritance
object
Resource
UserPoolResourceServer
Implements
IUserPoolResourceServer
IResource
IConstruct
IDependable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UserPoolResourceServer : Resource, IUserPoolResourceServer, IResource, IConstruct, IDependable
Syntax (vb)
Public Class UserPoolResourceServer Inherits Resource Implements IUserPoolResourceServer, IResource, IConstruct, IDependable
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

Constructors

UserPoolResourceServer(Construct, string, IUserPoolResourceServerProps)

Defines a User Pool OAuth2.0 Resource Server.

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

UserPoolResourceServerId

Resource server id.

Methods

FromUserPoolResourceServerId(Construct, string, string)

Import a user pool resource client given its id.

Constructors

UserPoolResourceServer(Construct, string, IUserPoolResourceServerProps)

Defines a User Pool OAuth2.0 Resource Server.

public UserPoolResourceServer(Construct scope, string id, IUserPoolResourceServerProps props)
Parameters
scope Construct
id string
props IUserPoolResourceServerProps
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) }
                }
            });

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: infused

UserPoolResourceServerId

Resource server id.

public virtual string UserPoolResourceServerId { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Methods

FromUserPoolResourceServerId(Construct, string, string)

Import a user pool resource client given its id.

public static IUserPoolResourceServer FromUserPoolResourceServerId(Construct scope, string id, string userPoolResourceServerId)
Parameters
scope Construct
id string
userPoolResourceServerId string
Returns

IUserPoolResourceServer

Remarks

ExampleMetadata: infused

Implements

IUserPoolResourceServer
IResource
Constructs.IConstruct
Constructs.IDependable
Back to top Generated by DocFX