Sha256: 720e91e03c23ecd16a6b4babf9bef63061ef7bc61b671d8e6f72f98551bbea69
Contents?: true
Size: 513 Bytes
Versions: 3
Compression:
Stored size: 513 Bytes
Contents
module Keratin::AuthN class Issuer def initialize(str) @uri = str @config_uri = @uri + Keratin::AuthN.config.configuration_path end def signing_key keys.find{|k| k['use'] == 'sig' } end def configuration @configuration ||= JSON.parse( Net::HTTP.get(URI.parse(@config_uri)) ) end def keys @keys ||= JSON::JWK::Set.new( JSON.parse( Net::HTTP.get(URI.parse(configuration['jwks_uri'])) ) ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
keratin-authn-0.1.2 | lib/keratin/authn/issuer.rb |
keratin-authn-0.1.1 | lib/keratin/authn/issuer.rb |
keratin-authn-0.1.0 | lib/keratin/authn/issuer.rb |