Class: Google::Apis::IntegrationsV1alpha::GoogleCloudIntegrationsV1alphaOAuth2AuthorizationCode

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/integrations_v1alpha/classes.rb,
lib/google/apis/integrations_v1alpha/representations.rb,
lib/google/apis/integrations_v1alpha/representations.rb

Overview

The OAuth Type where the client sends request with the client id and requested scopes to auth endpoint. User sees a consent screen and auth code is received at specified redirect url afterwards. The auth code is then combined with the client id and secret and sent to the token endpoint in exchange for the access and refresh token. The refresh token can be used to fetch new access tokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudIntegrationsV1alphaOAuth2AuthorizationCode

Returns a new instance of GoogleCloudIntegrationsV1alphaOAuth2AuthorizationCode.



7653
7654
7655
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7653

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#access_tokenGoogle::Apis::IntegrationsV1alpha::GoogleCloudIntegrationsV1alphaAccessToken

The access token represents the authorization of a specific application to access specific parts of a user’s data. Corresponds to the JSON property accessToken



7596
7597
7598
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7596

def access_token
  @access_token
end

#apply_reauth_policyBoolean Also known as: apply_reauth_policy?

Indicates if the user has opted in Google Reauth Policy. If opted in, the refresh token will be valid for 20 hours, after which time users must re- authenticate in order to obtain a new one. Corresponds to the JSON property applyReauthPolicy

Returns:

  • (Boolean)


7603
7604
7605
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7603

def apply_reauth_policy
  @apply_reauth_policy
end

#auth_codeString

The Auth Code that is used to initially retrieve the access token. Corresponds to the JSON property authCode

Returns:

  • (String)


7609
7610
7611
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7609

def auth_code
  @auth_code
end

#auth_endpointString

The auth url endpoint to send the auth code request to. Corresponds to the JSON property authEndpoint

Returns:

  • (String)


7614
7615
7616
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7614

def auth_endpoint
  @auth_endpoint
end

#auth_paramsGoogle::Apis::IntegrationsV1alpha::GoogleCloudIntegrationsV1alphaParameterMap

A generic multi-map that holds key value pairs. They keys and values can be of any type, unless specified. Corresponds to the JSON property authParams



7620
7621
7622
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7620

def auth_params
  @auth_params
end

#client_idString

The client's id. Corresponds to the JSON property clientId

Returns:

  • (String)


7625
7626
7627
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7625

def client_id
  @client_id
end

#client_secretString

The client's secret. Corresponds to the JSON property clientSecret

Returns:

  • (String)


7630
7631
7632
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7630

def client_secret
  @client_secret
end

#request_typeString

Represent how to pass parameters to fetch access token Corresponds to the JSON property requestType

Returns:

  • (String)


7635
7636
7637
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7635

def request_type
  @request_type
end

#scopeString

A space-delimited list of requested scope permissions. Corresponds to the JSON property scope

Returns:

  • (String)


7640
7641
7642
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7640

def scope
  @scope
end

#token_endpointString

The token url endpoint to send the token request to. Corresponds to the JSON property tokenEndpoint

Returns:

  • (String)


7645
7646
7647
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7645

def token_endpoint
  @token_endpoint
end

#token_paramsGoogle::Apis::IntegrationsV1alpha::GoogleCloudIntegrationsV1alphaParameterMap

A generic multi-map that holds key value pairs. They keys and values can be of any type, unless specified. Corresponds to the JSON property tokenParams



7651
7652
7653
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7651

def token_params
  @token_params
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
# File 'lib/google/apis/integrations_v1alpha/classes.rb', line 7658

def update!(**args)
  @access_token = args[:access_token] if args.key?(:access_token)
  @apply_reauth_policy = args[:apply_reauth_policy] if args.key?(:apply_reauth_policy)
  @auth_code = args[:auth_code] if args.key?(:auth_code)
  @auth_endpoint = args[:auth_endpoint] if args.key?(:auth_endpoint)
  @auth_params = args[:auth_params] if args.key?(:auth_params)
  @client_id = args[:client_id] if args.key?(:client_id)
  @client_secret = args[:client_secret] if args.key?(:client_secret)
  @request_type = args[:request_type] if args.key?(:request_type)
  @scope = args[:scope] if args.key?(:scope)
  @token_endpoint = args[:token_endpoint] if args.key?(:token_endpoint)
  @token_params = args[:token_params] if args.key?(:token_params)
end