Class: OpenIDConnect::Discovery::Provider::Config::Resource
- Inherits:
-
SWD::Resource
- Object
- SWD::Resource
- OpenIDConnect::Discovery::Provider::Config::Resource
- Defined in:
- lib/openid_connect/discovery/provider/config/resource.rb
Defined Under Namespace
Classes: Expired
Instance Method Summary collapse
- #endpoint ⇒ Object
-
#initialize(uri) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
#initialize(uri) ⇒ Resource
Returns a new instance of Resource.
12 13 14 15 16 17 |
# 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 |
Instance Method Details
#endpoint ⇒ Object
19 20 21 22 23 |
# 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.) end |