Created
April 3, 2019 08:52
-
-
Save uzzu/088e5064613ef65e6d77f56991807b75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'googleauth/token_store' | |
class OnMemoryTokenStore < Google::Auth::TokenStore | |
def initialize() | |
@cache = {} | |
end | |
def load(id) | |
@cache[id] | |
end | |
def store(id, token) | |
@cache[id] = token | |
end | |
def delete(id) | |
@cache.delete(id) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment