Class: Peddler::LWAToken

Inherits:
Data
  • Object
show all
Defined in:
sig/peddler/lwa_token.rbs

Overview

Login with Amazon (LWA) OAuth 2.0 token response

This type represents the response from Amazon's token endpoint for all grant types: - authorization_code: Returns access_token, refresh_token, token_type, expires_in - refresh_token: Returns access_token, token_type, expires_in (refresh_token rarely included) - client_credentials: Returns access_token, token_type, expires_in, scope

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parseLWAToken

Parameters:

  • value (Object)

Returns:



26
# File 'sig/peddler/lwa_token.rbs', line 26

def self.parse: (untyped value) -> LWAToken

Instance Method Details

#access_tokenString

The access token used to authenticate SP-API requests

Returns:

  • (String)


12
# File 'sig/peddler/lwa_token.rbs', line 12

def access_token: () -> String

#expires_inInteger?

Number of seconds until the access token expires (typically 3600)

Returns:

  • (Integer, nil)


18
# File 'sig/peddler/lwa_token.rbs', line 18

def expires_in: () -> Integer?

#refresh_tokenString?

The refresh token (present for authorization_code grant, rarely for refresh_token grant)

Returns:

  • (String, nil)


21
# File 'sig/peddler/lwa_token.rbs', line 21

def refresh_token: () -> String?

#scopeString?

The scope granted (only present for client_credentials grant)

Returns:

  • (String, nil)


24
# File 'sig/peddler/lwa_token.rbs', line 24

def scope: () -> String?

#token_typeString

The token type (always "bearer")

Returns:

  • (String)


15
# File 'sig/peddler/lwa_token.rbs', line 15

def token_type: () -> String