Class: AWSCDK::AppFlow::CfnConnectorProfile::OAuth2CredentialsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_flow/cfn_connector_profile.rb

Overview

The OAuth 2.0 credentials required for OAuth 2.0 authentication.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token: nil, client_id: nil, client_secret: nil, o_auth_request: nil, refresh_token: nil) ⇒ OAuth2CredentialsProperty

Returns a new instance of OAuth2CredentialsProperty.

Parameters:

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

    The access token used to access the connector on your behalf.

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

    The identifier for the desired client.

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

    The client secret used by the OAuth client to authenticate to the authorization server.

  • o_auth_request (AWSCDK::IResolvable, AWSCDK::AppFlow::CfnConnectorProfile::ConnectorOAuthRequestProperty, nil) (defaults to: nil)
  • refresh_token (String, nil) (defaults to: nil)

    The refresh token used to refresh an expired access token.



1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
# File 'app_flow/cfn_connector_profile.rb', line 1740

def initialize(access_token: nil, client_id: nil, client_secret: nil, o_auth_request: nil, refresh_token: nil)
  @access_token = access_token
  Jsii::Type.check_type(@access_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessToken") unless @access_token.nil?
  @client_id = client_id
  Jsii::Type.check_type(@client_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientId") unless @client_id.nil?
  @client_secret = client_secret
  Jsii::Type.check_type(@client_secret, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientSecret") unless @client_secret.nil?
  @o_auth_request = o_auth_request.is_a?(Hash) ? ::AWSCDK::AppFlow::CfnConnectorProfile::ConnectorOAuthRequestProperty.new(**o_auth_request.transform_keys(&:to_sym)) : o_auth_request
  Jsii::Type.check_type(@o_auth_request, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBmbG93LkNmbkNvbm5lY3RvclByb2ZpbGUuQ29ubmVjdG9yT0F1dGhSZXF1ZXN0UHJvcGVydHkifV19fQ==")), "oAuthRequest") unless @o_auth_request.nil?
  @refresh_token = refresh_token
  Jsii::Type.check_type(@refresh_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "refreshToken") unless @refresh_token.nil?
end

Instance Attribute Details

#access_tokenString? (readonly)

The access token used to access the connector on your behalf.



1757
1758
1759
# File 'app_flow/cfn_connector_profile.rb', line 1757

def access_token
  @access_token
end

#client_idString? (readonly)

The identifier for the desired client.



1762
1763
1764
# File 'app_flow/cfn_connector_profile.rb', line 1762

def client_id
  @client_id
end

#client_secretString? (readonly)

The client secret used by the OAuth client to authenticate to the authorization server.



1767
1768
1769
# File 'app_flow/cfn_connector_profile.rb', line 1767

def client_secret
  @client_secret
end

#refresh_tokenString? (readonly)

The refresh token used to refresh an expired access token.



1775
1776
1777
# File 'app_flow/cfn_connector_profile.rb', line 1775

def refresh_token
  @refresh_token
end

Class Method Details

.jsii_propertiesObject



1777
1778
1779
1780
1781
1782
1783
1784
1785
# File 'app_flow/cfn_connector_profile.rb', line 1777

def self.jsii_properties
  {
    :access_token => "accessToken",
    :client_id => "clientId",
    :client_secret => "clientSecret",
    :o_auth_request => "oAuthRequest",
    :refresh_token => "refreshToken",
  }
end

Instance Method Details

#to_jsiiObject



1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
# File 'app_flow/cfn_connector_profile.rb', line 1787

def to_jsii
  result = {}
  result.merge!({
    "accessToken" => @access_token,
    "clientId" => @client_id,
    "clientSecret" => @client_secret,
    "oAuthRequest" => @o_auth_request,
    "refreshToken" => @refresh_token,
  })
  result.compact
end