Class: AWSCDK::Glue::CfnConnection::AuthorizationCodePropertiesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_connection.rb

Overview

The set of properties required for the the OAuth2 AUTHORIZATION_CODE grant type workflow.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization_code: nil, redirect_uri: nil) ⇒ AuthorizationCodePropertiesProperty

Returns a new instance of AuthorizationCodePropertiesProperty.

Parameters:

  • authorization_code (String, nil) (defaults to: nil)

    An authorization code to be used in the third leg of the AUTHORIZATION_CODE grant workflow.

  • redirect_uri (String, nil) (defaults to: nil)

    The redirect URI where the user gets redirected to by authorization server when issuing an authorization code.



600
601
602
603
604
605
# File 'glue/cfn_connection.rb', line 600

def initialize(authorization_code: nil, redirect_uri: nil)
  @authorization_code = authorization_code
  Jsii::Type.check_type(@authorization_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationCode") unless @authorization_code.nil?
  @redirect_uri = redirect_uri
  Jsii::Type.check_type(@redirect_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "redirectUri") unless @redirect_uri.nil?
end

Instance Attribute Details

#authorization_codeString? (readonly)

An authorization code to be used in the third leg of the AUTHORIZATION_CODE grant workflow.

This is a single-use code which becomes invalid once exchanged for an access token, thus it is acceptable to have this value as a request parameter.



613
614
615
# File 'glue/cfn_connection.rb', line 613

def authorization_code
  @authorization_code
end

#redirect_uriString? (readonly)

The redirect URI where the user gets redirected to by authorization server when issuing an authorization code.

The URI is subsequently used when the authorization code is exchanged for an access token.



620
621
622
# File 'glue/cfn_connection.rb', line 620

def redirect_uri
  @redirect_uri
end

Class Method Details

.jsii_propertiesObject



622
623
624
625
626
627
# File 'glue/cfn_connection.rb', line 622

def self.jsii_properties
  {
    :authorization_code => "authorizationCode",
    :redirect_uri => "redirectUri",
  }
end

Instance Method Details

#to_jsiiObject



629
630
631
632
633
634
635
636
# File 'glue/cfn_connection.rb', line 629

def to_jsii
  result = {}
  result.merge!({
    "authorizationCode" => @authorization_code,
    "redirectUri" => @redirect_uri,
  })
  result.compact
end