Skip to content

Instantly share code, notes, and snippets.

@linki
Last active August 29, 2015 14:14
Show Gist options
  • Save linki/e8c19402bc9468dc20f1 to your computer and use it in GitHub Desktop.
Save linki/e8c19402bc9468dc20f1 to your computer and use it in GitHub Desktop.
extract at
require 'openssl'
require 'json/jwt'
require 'pp'
token = ARGV[0]
private_key = OpenSSL::PKey::RSA.new(ENV.fetch('CONCIERGE_PRIVATE_KEY').gsub('.', "\n"))
token = JSON::JWT.decode(token, private_key)
pp token.to_hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment