Class: AWSCDK::Glue::CfnConnection::OAuth2CredentialsProperty

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

Overview

The credentials used when the authentication type is OAuth2 authentication.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token: nil, jwt_token: nil, refresh_token: nil, user_managed_client_application_client_secret: nil) ⇒ OAuth2CredentialsProperty

Returns a new instance of OAuth2CredentialsProperty.

Parameters:

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

    The access token used when the authentication type is OAuth2.

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

    The JSON Web Token (JWT) used when the authentication type is OAuth2.

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

    The refresh token used when the authentication type is OAuth2.

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

    The client application client secret if the client application is user managed.



925
926
927
928
929
930
931
932
933
934
# File 'glue/cfn_connection.rb', line 925

def initialize(access_token: nil, jwt_token: nil, refresh_token: nil, user_managed_client_application_client_secret: nil)
  @access_token = access_token
  Jsii::Type.check_type(@access_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessToken") unless @access_token.nil?
  @jwt_token = jwt_token
  Jsii::Type.check_type(@jwt_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jwtToken") unless @jwt_token.nil?
  @refresh_token = refresh_token
  Jsii::Type.check_type(@refresh_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "refreshToken") unless @refresh_token.nil?
  @user_managed_client_application_client_secret = user_managed_client_application_client_secret
  Jsii::Type.check_type(@user_managed_client_application_client_secret, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userManagedClientApplicationClientSecret") unless @user_managed_client_application_client_secret.nil?
end

Instance Attribute Details

#access_tokenString? (readonly)

The access token used when the authentication type is OAuth2.



940
941
942
# File 'glue/cfn_connection.rb', line 940

def access_token
  @access_token
end

#jwt_tokenString? (readonly)

The JSON Web Token (JWT) used when the authentication type is OAuth2.



945
946
947
# File 'glue/cfn_connection.rb', line 945

def jwt_token
  @jwt_token
end

#refresh_tokenString? (readonly)

The refresh token used when the authentication type is OAuth2.



950
951
952
# File 'glue/cfn_connection.rb', line 950

def refresh_token
  @refresh_token
end

#user_managed_client_application_client_secretString? (readonly)

The client application client secret if the client application is user managed.



955
956
957
# File 'glue/cfn_connection.rb', line 955

def user_managed_client_application_client_secret
  @user_managed_client_application_client_secret
end

Class Method Details

.jsii_propertiesObject



957
958
959
960
961
962
963
964
# File 'glue/cfn_connection.rb', line 957

def self.jsii_properties
  {
    :access_token => "accessToken",
    :jwt_token => "jwtToken",
    :refresh_token => "refreshToken",
    :user_managed_client_application_client_secret => "userManagedClientApplicationClientSecret",
  }
end

Instance Method Details

#to_jsiiObject



966
967
968
969
970
971
972
973
974
975
# File 'glue/cfn_connection.rb', line 966

def to_jsii
  result = {}
  result.merge!({
    "accessToken" => @access_token,
    "jwtToken" => @jwt_token,
    "refreshToken" => @refresh_token,
    "userManagedClientApplicationClientSecret" => @user_managed_client_application_client_secret,
  })
  result.compact
end