Class UserPoolResourceServer
Defines a User Pool OAuth2.0 Resource Server.
Inherited Members
Namespace: Amazon.CDK.AWS.Cognito
Assembly: Amazon.CDK.AWS.Cognito.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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
UserPoolResourceServer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
UserPoolResourceServer(Construct, String, IUserPoolResourceServerProps) |
Properties
UserPoolResourceServerId | Resource server id. |
Methods
FromUserPoolResourceServerId(Construct, String, String) | Import a user pool resource client given its id. |
Constructors
UserPoolResourceServer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected UserPoolResourceServer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
UserPoolResourceServer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected UserPoolResourceServer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
UserPoolResourceServer(Construct, String, IUserPoolResourceServerProps)
public UserPoolResourceServer(Construct scope, string id, IUserPoolResourceServerProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IUserPoolResourceServerProps
Properties
UserPoolResourceServerId
Resource server id.
public virtual string UserPoolResourceServerId { get; }
Property Value
System.String
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 Constructs.Construct
- id System.String
- userPoolResourceServerId System.String
Returns
Implements
Constructs.IConstruct