Class ResourceServerScope
A scope for ResourceServer.
Inheritance
System.Object
ResourceServerScope
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ResourceServerScope : DeputyBase
Syntax (vb)
Public Class ResourceServerScope
Inherits DeputyBase
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
ResourceServerScope(IResourceServerScopeProps) | |
ResourceServerScope(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ResourceServerScope(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ScopeDescription | A description of the scope. |
ScopeName | The name of the scope. |
Constructors
ResourceServerScope(IResourceServerScopeProps)
public ResourceServerScope(IResourceServerScopeProps props)
Parameters
ResourceServerScope(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ResourceServerScope(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ResourceServerScope(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ResourceServerScope(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ScopeDescription
A description of the scope.
public virtual string ScopeDescription { get; }
Property Value
System.String
ScopeName
The name of the scope.
public virtual string ScopeName { get; }
Property Value
System.String