interface ResourceServerScopeProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Cognito.ResourceServerScopeProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#ResourceServerScopeProps |
![]() | software.amazon.awscdk.services.cognito.ResourceServerScopeProps |
![]() | aws_cdk.aws_cognito.ResourceServerScopeProps |
![]() | aws-cdk-lib » aws_cognito » ResourceServerScopeProps |
Props to initialize ResourceServerScope.
Example
const pool = new cognito.UserPool(this, 'Pool');
const readOnlyScope = new cognito.ResourceServerScope({ scopeName: 'read', scopeDescription: 'Read-only access' });
const fullAccessScope = new cognito.ResourceServerScope({ scopeName: '*', scopeDescription: 'Full access' });
const userServer = pool.addResourceServer('ResourceServer', {
identifier: 'users',
scopes: [ readOnlyScope, fullAccessScope ],
});
const readOnlyClient = pool.addClient('read-only-client', {
// ...
oAuth: {
// ...
scopes: [ cognito.OAuthScope.resourceServer(userServer, readOnlyScope) ],
},
});
const fullAccessClient = pool.addClient('full-access-client', {
// ...
oAuth: {
// ...
scopes: [ cognito.OAuthScope.resourceServer(userServer, fullAccessScope) ],
},
});
Properties
Name | Type | Description |
---|---|---|
scope | string | A description of the scope. |
scope | string | The name of the scope. |
scopeDescription
Type:
string
A description of the scope.
scopeName
Type:
string
The name of the scope.