Class UserPoolResourceServerOptions
Options to create a UserPoolResourceServer.
Inheritance
System.Object
UserPoolResourceServerOptions
Implements
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UserPoolResourceServerOptions : Object, IUserPoolResourceServerOptions
Syntax (vb)
Public Class UserPoolResourceServerOptions
Inherits Object
Implements 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
Constructors
UserPoolResourceServerOptions() |
Properties
Identifier | A unique resource server identifier for the resource server. |
Scopes | Oauth scopes. |
UserPoolResourceServerName | A friendly name for the resource server. |
Constructors
UserPoolResourceServerOptions()
public UserPoolResourceServerOptions()
Properties
Identifier
A unique resource server identifier for the resource server.
public string Identifier { get; set; }
Property Value
System.String
Scopes
Oauth scopes.
public ResourceServerScope[] Scopes { get; set; }
Property Value
Remarks
Default: - No scopes will be added
UserPoolResourceServerName
A friendly name for the resource server.
public string UserPoolResourceServerName { get; set; }
Property Value
System.String
Remarks
Default: - same as identifier