module Doorkeeper::OpenidConnect
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
# File lib/doorkeeper/openid_connect/config.rb, line 11 def self.configuration @config || (fail Errors::MissingConfiguration) end
configure(&block)
click to toggle source
# File lib/doorkeeper/openid_connect/config.rb, line 3 def self.configure(&block) if Doorkeeper.configuration.orm != :active_record fail Errors::InvalidConfiguration, 'Doorkeeper OpenID Connect currently only supports the ActiveRecord ORM adapter' end @config = Config::Builder.new(&block).build end
signing_algorithm()
click to toggle source
# File lib/doorkeeper/openid_connect.rb, line 39 def self.signing_algorithm configuration.signing_algorithm.to_s.upcase.to_sym end
signing_key()
click to toggle source
# File lib/doorkeeper/openid_connect.rb, line 43 def self.signing_key key = if [:HS256, :HS384, :HS512].include?(signing_algorithm) configuration.signing_key else OpenSSL::PKey.read(configuration.signing_key) end JSON::JWK.new(key) end
signing_key_normalized()
click to toggle source
# File lib/doorkeeper/openid_connect.rb, line 53 def self.signing_key_normalized key = signing_key case key[:kty].to_sym when :RSA key.slice(:kty, :kid, :e, :n) when :EC key.slice(:kty, :kid, :x, :y) when :oct key.slice(:kty, :kid) end end