Skip to content

Instantly share code, notes, and snippets.

@uzzu
Created April 3, 2019 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uzzu/088e5064613ef65e6d77f56991807b75 to your computer and use it in GitHub Desktop.
Save uzzu/088e5064613ef65e6d77f56991807b75 to your computer and use it in GitHub Desktop.
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