Interface IUserPoolResourceServerOptions
Options to create a UserPoolResourceServer.
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.AWS.Cognito.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
System.String
Scopes
Oauth scopes.
virtual ResourceServerScope[] Scopes { get; }
Property Value
Remarks
Default: - No scopes will be added
UserPoolResourceServerName
A friendly name for the resource server.
virtual string UserPoolResourceServerName { get; }
Property Value
System.String
Remarks
Default: - same as identifier