Class: AWSCDK::Cognito::OAuthScope
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Cognito::OAuthScope
- Defined in:
- cognito/o_auth_scope.rb
Overview
OAuth scopes that are allowed with this client.
Class Method Summary collapse
-
.COGNITO_ADMIN ⇒ AWSCDK::Cognito::OAuthScope
Grants access to Amazon Cognito User Pool API operations that require access tokens, such as UpdateUserAttributes and VerifyUserAttribute.
-
.custom(name) ⇒ AWSCDK::Cognito::OAuthScope
Custom scope is one that you define for your own resource server in the Resource Servers.
-
.EMAIL ⇒ AWSCDK::Cognito::OAuthScope
Grants access to the 'email' and 'email_verified' claims.
- .jsii_overridable_methods ⇒ Object
-
.OPENID ⇒ AWSCDK::Cognito::OAuthScope
Returns all user attributes in the ID token that are readable by the client.
-
.PHONE ⇒ AWSCDK::Cognito::OAuthScope
Grants access to the 'phone_number' and 'phone_number_verified' claims.
-
.PROFILE ⇒ AWSCDK::Cognito::OAuthScope
Grants access to all user attributes that are readable by the client Automatically includes access to
OAuthScope.OPENID. -
.resource_server(server, scope) ⇒ AWSCDK::Cognito::OAuthScope
Adds a custom scope that's tied to a resource server in your stack.
Instance Method Summary collapse
-
#initialize(*args) ⇒ OAuthScope
constructor
A new instance of OAuthScope.
-
#scope_name ⇒ String
The name of this scope as recognized by CloudFormation.
Constructor Details
#initialize(*args) ⇒ OAuthScope
Returns a new instance of OAuthScope.
10 11 12 |
# File 'cognito/o_auth_scope.rb', line 10 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_cognito.OAuthScope does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.COGNITO_ADMIN ⇒ AWSCDK::Cognito::OAuthScope
Grants access to Amazon Cognito User Pool API operations that require access tokens, such as UpdateUserAttributes and VerifyUserAttribute.
46 47 48 |
# File 'cognito/o_auth_scope.rb', line 46 def self.COGNITO_ADMIN() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cognito.OAuthScope", "COGNITO_ADMIN") end |
.custom(name) ⇒ AWSCDK::Cognito::OAuthScope
Custom scope is one that you define for your own resource server in the Resource Servers.
The format is 'resource-server-identifier/scope'.
27 28 29 30 |
# File 'cognito/o_auth_scope.rb', line 27 def self.custom(name) Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cognito.OAuthScope", "custom", [name]) end |
.EMAIL ⇒ AWSCDK::Cognito::OAuthScope
Grants access to the 'email' and 'email_verified' claims.
Automatically includes access to OAuthScope.OPENID.
55 56 57 |
# File 'cognito/o_auth_scope.rb', line 55 def self.EMAIL() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cognito.OAuthScope", "EMAIL") end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 |
# File 'cognito/o_auth_scope.rb', line 14 def self.jsii_overridable_methods { :scope_name => { kind: :property, name: "scopeName", is_optional: false }, } end |
.OPENID ⇒ AWSCDK::Cognito::OAuthScope
Returns all user attributes in the ID token that are readable by the client.
62 63 64 |
# File 'cognito/o_auth_scope.rb', line 62 def self.OPENID() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cognito.OAuthScope", "OPENID") end |
.PHONE ⇒ AWSCDK::Cognito::OAuthScope
Grants access to the 'phone_number' and 'phone_number_verified' claims.
Automatically includes access to OAuthScope.OPENID.
71 72 73 |
# File 'cognito/o_auth_scope.rb', line 71 def self.PHONE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cognito.OAuthScope", "PHONE") end |
.PROFILE ⇒ AWSCDK::Cognito::OAuthScope
Grants access to all user attributes that are readable by the client Automatically includes access to OAuthScope.OPENID.
78 79 80 |
# File 'cognito/o_auth_scope.rb', line 78 def self.PROFILE() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_cognito.OAuthScope", "PROFILE") end |
.resource_server(server, scope) ⇒ AWSCDK::Cognito::OAuthScope
Adds a custom scope that's tied to a resource server in your stack.
37 38 39 40 41 |
# File 'cognito/o_auth_scope.rb', line 37 def self.resource_server(server, scope) Jsii::Type.check_type(server, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2xSZXNvdXJjZVNlcnZlciJ9")), "server") Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5SZXNvdXJjZVNlcnZlclNjb3BlIn0=")), "scope") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cognito.OAuthScope", "resourceServer", [server, scope]) end |
Instance Method Details
#scope_name ⇒ String
The name of this scope as recognized by CloudFormation.
86 87 88 |
# File 'cognito/o_auth_scope.rb', line 86 def scope_name() jsii_get_property("scopeName") end |