Class: AWSCDK::Cognito::OAuthFlows
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::OAuthFlows
- Defined in:
- cognito/o_auth_flows.rb
Overview
Types of OAuth grant flows.
Instance Attribute Summary collapse
-
#authorization_code_grant ⇒ Boolean?
readonly
Initiate an authorization code grant flow, which provides an authorization code as the response.
-
#client_credentials ⇒ Boolean?
readonly
Client should get the access token and ID token from the token endpoint using a combination of client and client_secret.
-
#implicit_code_grant ⇒ Boolean?
readonly
The client should get the access token and ID token directly.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(authorization_code_grant: nil, client_credentials: nil, implicit_code_grant: nil) ⇒ OAuthFlows
constructor
A new instance of OAuthFlows.
- #to_jsii ⇒ Object
Constructor Details
#initialize(authorization_code_grant: nil, client_credentials: nil, implicit_code_grant: nil) ⇒ OAuthFlows
Returns a new instance of OAuthFlows.
12 13 14 15 16 17 18 19 |
# File 'cognito/o_auth_flows.rb', line 12 def initialize(authorization_code_grant: nil, client_credentials: nil, implicit_code_grant: nil) @authorization_code_grant = Jsii::Type.check_type(@authorization_code_grant, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "authorizationCodeGrant") unless @authorization_code_grant.nil? @client_credentials = client_credentials Jsii::Type.check_type(@client_credentials, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "clientCredentials") unless @client_credentials.nil? @implicit_code_grant = implicit_code_grant Jsii::Type.check_type(@implicit_code_grant, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "implicitCodeGrant") unless @implicit_code_grant.nil? end |
Instance Attribute Details
#authorization_code_grant ⇒ Boolean? (readonly)
Note:
Default: false
Initiate an authorization code grant flow, which provides an authorization code as the response.
25 26 27 |
# File 'cognito/o_auth_flows.rb', line 25 def @authorization_code_grant end |
#client_credentials ⇒ Boolean? (readonly)
Note:
Default: false
Client should get the access token and ID token from the token endpoint using a combination of client and client_secret.
30 31 32 |
# File 'cognito/o_auth_flows.rb', line 30 def client_credentials @client_credentials end |
#implicit_code_grant ⇒ Boolean? (readonly)
Note:
Default: false
The client should get the access token and ID token directly.
35 36 37 |
# File 'cognito/o_auth_flows.rb', line 35 def implicit_code_grant @implicit_code_grant end |
Class Method Details
.jsii_properties ⇒ Object
37 38 39 40 41 42 43 |
# File 'cognito/o_auth_flows.rb', line 37 def self.jsii_properties { :authorization_code_grant => "authorizationCodeGrant", :client_credentials => "clientCredentials", :implicit_code_grant => "implicitCodeGrant", } end |
Instance Method Details
#to_jsii ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'cognito/o_auth_flows.rb', line 45 def to_jsii result = {} result.merge!({ "authorizationCodeGrant" => @authorization_code_grant, "clientCredentials" => @client_credentials, "implicitCodeGrant" => @implicit_code_grant, }) result.compact end |