Skip to content

Instantly share code, notes, and snippets.

@ysv
Last active October 15, 2018 11:28
Show Gist options
  • Save ysv/9d3daae36f341108a85cc2a6c6d759c5 to your computer and use it in GitHub Desktop.
Save ysv/9d3daae36f341108a85cc2a6c6d759c5 to your computer and use it in GitHub Desktop.
# From barong container to get JWT_PUBLIC_KEY.
OpenSSL::PKey.read(Base64.urlsafe_decode64(Rails.application.secrets.jwt_shared_secret_key)).public_key.to_pem.yield_self {|pub| Base64.urlsafe_encode64(pub)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment