Class: Aws::Signin::Types::CreateOAuth2TokenResponseBody

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-signin/types.rb

Overview

Response body payload for CreateOAuth2Token operation

The response content depends on the grant_type from the request:

  • grant_type=authorization_code: Returns all fields including refresh_token and id_token
  • grant_type=refresh_token: Returns access_token, token_type, expires_in, refresh_token (no id_token)

Constant Summary collapse

SENSITIVE =
[:access_token, :refresh_token]

Instance Attribute Summary collapse

Instance Attribute Details

#access_tokenTypes::AccessToken

Scoped-down AWS credentials (15 minute duration) Present for both authorization code redemption and token refresh

Returns:



201
202
203
204
205
206
207
208
209
# File 'gems/aws-sdk-core/lib/aws-sdk-signin/types.rb', line 201

class CreateOAuth2TokenResponseBody < Struct.new(
  :access_token,
  :token_type,
  :expires_in,
  :refresh_token,
  :id_token)
  SENSITIVE = [:access_token, :refresh_token]
  include Aws::Structure
end

#expires_inInteger

Time to expiry in seconds (maximum 900) Present for both authorization code redemption and token refresh

Returns:

  • (Integer)


201
202
203
204
205
206
207
208
209
# File 'gems/aws-sdk-core/lib/aws-sdk-signin/types.rb', line 201

class CreateOAuth2TokenResponseBody < Struct.new(
  :access_token,
  :token_type,
  :expires_in,
  :refresh_token,
  :id_token)
  SENSITIVE = [:access_token, :refresh_token]
  include Aws::Structure
end

#id_tokenString

ID token containing user identity information Present only in authorization code redemption response (grant_type=authorization_code) Not included in token refresh responses

Returns:

  • (String)


201
202
203
204
205
206
207
208
209
# File 'gems/aws-sdk-core/lib/aws-sdk-signin/types.rb', line 201

class CreateOAuth2TokenResponseBody < Struct.new(
  :access_token,
  :token_type,
  :expires_in,
  :refresh_token,
  :id_token)
  SENSITIVE = [:access_token, :refresh_token]
  include Aws::Structure
end

#refresh_tokenString

Encrypted refresh token with cnf.jkt (SHA-256 thumbprint of presented jwk) Always present in responses (required for both flows)

Returns:

  • (String)


201
202
203
204
205
206
207
208
209
# File 'gems/aws-sdk-core/lib/aws-sdk-signin/types.rb', line 201

class CreateOAuth2TokenResponseBody < Struct.new(
  :access_token,
  :token_type,
  :expires_in,
  :refresh_token,
  :id_token)
  SENSITIVE = [:access_token, :refresh_token]
  include Aws::Structure
end

#token_typeString

Token type indicating this is AWS SigV4 credentials Value is "aws_sigv4" for both flows

Returns:

  • (String)


201
202
203
204
205
206
207
208
209
# File 'gems/aws-sdk-core/lib/aws-sdk-signin/types.rb', line 201

class CreateOAuth2TokenResponseBody < Struct.new(
  :access_token,
  :token_type,
  :expires_in,
  :refresh_token,
  :id_token)
  SENSITIVE = [:access_token, :refresh_token]
  include Aws::Structure
end