Sha256: de3520b9ab78f3ee5a560a1407940f5bb5d759054f9717429f60d68cb33ae089
Contents?: true
Size: 421 Bytes
Versions: 8
Compression:
Stored size: 421 Bytes
Contents
module Keratin::AuthN class RemoteSignatureVerifier attr_reader :keychain def initialize(keychain) @keychain = keychain end def verify(jwt) jwt.verify!(key(jwt['iss'], jwt.kid)) rescue JSON::JWT::VerificationFailed, JSON::JWT::UnexpectedAlgorithm false end private def key(issuer, kid) keychain.getset(kid){ Issuer.new(issuer).signing_key(kid) } end end end
Version data entries
8 entries across 8 versions & 1 rubygems