module Keratin::AuthN::Test::Helpers
Constants
- JWS_ALGORITHM
Private Instance Methods
id_token_for(subject)
click to toggle source
a factory for JWT id_tokens
# File lib/keratin/authn/test/helpers.rb, line 6 def id_token_for(subject) JSON::JWT.new( iss: Keratin::AuthN.config.issuer, aud: Keratin::AuthN.config.audience, sub: subject, iat: 10.seconds.ago, exp: 1.hour.from_now ).sign(Keratin::AuthN.keychain.key, JWS_ALGORITHM).to_s end