class OAuth2::AccessToken
def from_hash(client, hash)
-
(AccessToken)
- the initialized AccessToken
Options Hash:
(**hash)
-
'access_token',
(String, Symbol
) -- 'id_token', 'token', :access_token, :id_token, or :token the access token
Parameters:
-
hash
(Hash
) -- a hash of AccessToken property values -
client
(Client
) -- the OAuth2::Client instance
def from_hash(client, hash) fresh = hash.dup supported_keys = TOKEN_KEY_LOOKUP & fresh.keys key = supported_keys[0] extra_tokens_warning(supported_keys, key) token = fresh.delete(key) new(client, token, fresh) end