class MangoApi::MemoryStorage
Stores client-specific OAuth tokens in-memory.
Public Class Methods
new()
click to toggle source
# File lib/mangopay/api/auth_token_manager.rb, line 98 def initialize @token = {} end
Public Instance Methods
retrieve_for(client_id)
click to toggle source
Retrieves a client-specific OAuth token.
@param client_id
ID of the client whose token to retrieve
# File lib/mangopay/api/auth_token_manager.rb, line 105 def retrieve_for(client_id) @token[client_id] end
store_for(client_id, token)
click to toggle source
Stores a client-specific OAuth token.
@param client_id
ID of the client for which token is being stored @param token
OAuth token for this client
# File lib/mangopay/api/auth_token_manager.rb, line 113 def store_for(client_id, token) @token[client_id] = token end