Class: AWSCDK::AppFlow::CfnConnectorProfile::OAuthCredentialsProperty

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

Overview

The OAuth credentials required for OAuth type 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, connector_o_auth_request: nil, refresh_token: nil) ⇒ OAuthCredentialsProperty

Returns a new instance of OAuthCredentialsProperty.

Parameters:

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

    The access token used to access protected SAPOData resources.

  • 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.

  • connector_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 expired access token.



1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
# File 'app_flow/cfn_connector_profile.rb', line 1866

def initialize(access_token: nil, client_id: nil, client_secret: nil, connector_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?
  @connector_o_auth_request = connector_o_auth_request.is_a?(Hash) ? ::AWSCDK::AppFlow::CfnConnectorProfile::ConnectorOAuthRequestProperty.new(**connector_o_auth_request.transform_keys(&:to_sym)) : connector_o_auth_request
  Jsii::Type.check_type(@connector_o_auth_request, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBmbG93LkNmbkNvbm5lY3RvclByb2ZpbGUuQ29ubmVjdG9yT0F1dGhSZXF1ZXN0UHJvcGVydHkifV19fQ==")), "connectorOAuthRequest") unless @connector_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 protected SAPOData resources.



1883
1884
1885
# File 'app_flow/cfn_connector_profile.rb', line 1883

def access_token
  @access_token
end

#client_idString? (readonly)

The identifier for the desired client.



1888
1889
1890
# File 'app_flow/cfn_connector_profile.rb', line 1888

def client_id
  @client_id
end

#client_secretString? (readonly)

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



1893
1894
1895
# File 'app_flow/cfn_connector_profile.rb', line 1893

def client_secret
  @client_secret
end

#connector_o_auth_requestAWSCDK::IResolvable, ... (readonly)



1896
1897
1898
# File 'app_flow/cfn_connector_profile.rb', line 1896

def connector_o_auth_request
  @connector_o_auth_request
end

#refresh_tokenString? (readonly)

The refresh token used to refresh expired access token.



1901
1902
1903
# File 'app_flow/cfn_connector_profile.rb', line 1901

def refresh_token
  @refresh_token
end

Class Method Details

.jsii_propertiesObject



1903
1904
1905
1906
1907
1908
1909
1910
1911
# File 'app_flow/cfn_connector_profile.rb', line 1903

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

Instance Method Details

#to_jsiiObject



1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
# File 'app_flow/cfn_connector_profile.rb', line 1913

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