class OpenIDConnect::Discovery::Provider::Config::Resource
Public Class Methods
new(uri)
click to toggle source
# File lib/openid_connect/discovery/provider/config/resource.rb, line 12 def initialize(uri) @host = uri.host @port = uri.port unless [80, 443].include?(uri.port) @path = File.join uri.path, '.well-known/openid-configuration' attr_missing! end
Public Instance Methods
endpoint()
click to toggle source
# File lib/openid_connect/discovery/provider/config/resource.rb, line 19 def endpoint SWD.url_builder.build [nil, host, port, path, nil, nil] rescue URI::Error => e raise SWD::Exception.new(e.message) end
Private Instance Methods
cache_key()
click to toggle source
# File lib/openid_connect/discovery/provider/config/resource.rb, line 31 def cache_key sha256 = OpenSSL::Digest::SHA256.hexdigest host "swd:resource:opneid-conf:#{sha256}" end
to_response_object(hash)
click to toggle source
# File lib/openid_connect/discovery/provider/config/resource.rb, line 27 def to_response_object(hash) Response.new(hash) end