Class | OAuth2::AccessToken |
In: |
lib/oauth2/access_token.rb
|
Parent: | Object |
client | [R] | |
expires_at | [R] | |
expires_in | [R] | |
options | [RW] | |
params | [R] | |
refresh_token | [R] | |
token | [R] |
Initializes an AccessToken from a Hash
@param [Client] the OAuth2::Client instance @param [Hash] a hash of AccessToken property values @return [AccessToken] the initalized AccessToken
Initializes an AccessToken from a key/value application/x-www-form-urlencoded string
@param [Client] client the OAuth2::Client instance @param [String] kvform the application/x-www-form-urlencoded string @return [AccessToken] the initalized AccessToken
Initalize an AccessToken
@param [Client] client the OAuth2::Client instance @param [String] token the Access Token value @param [Hash] opts the options to create the Access Token with @option opts [String] :refresh_token (nil) the refresh_token value @option opts [FixNum, String] :expires_in (nil) the number of seconds in which the AccessToken will expire @option opts [FixNum, String] :expires_at (nil) the epoch time in seconds in which AccessToken will expire @option opts [Symbol] :mode (:header) the transmission mode of the Access Token parameter value
one of :header, :body or :query
@option opts [String] :header_format (‘Bearer %s’) the string format to use for the Authorization header @option opts [String] :param_name (‘bearer_token’) the parameter name to use for transmission of the
Access Token value in :body or :query transmission mode
Refreshes the current Access Token
@return [AccessToken] a new AccessToken @note options should be carried over to the new AccessToken
Make a request with the Access Token
@param [Symbol] verb the HTTP request method @param [String] path the HTTP URL path of the request @param [Hash] opts the options to make the request with @see Client#request