Module: RapidRack::WithClaims
- Included in:
- Authenticator
- Defined in:
- lib/rapid_rack/with_claims.rb
Instance Method Summary collapse
Instance Method Details
#with_claims(env, assertion) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/rapid_rack/with_claims.rb', line 3 def with_claims(env, assertion) claims = JSON::JWT.decode(assertion, secret) validate_claims(claims) yield claims rescue JSON::JWT::Exception => e error_handler.handle(env, e) rescue InvalidClaim => e error_handler.handle(env, e) end |