Class: Basecamp::Oauth::ProtectedResourceMetadata
- Inherits:
-
Data
- Object
- Data
- Basecamp::Oauth::ProtectedResourceMetadata
- Defined in:
- lib/basecamp/oauth/protected_resource_metadata.rb
Overview
RFC 9728 protected-resource metadata (hop 1 of resource-first discovery).
authorization_servers preserves "key absent" and "present but empty
[]" distinctly: BC5 omits the key while dark, per RFC 9728 ยง3.2.
Both select Launchpad, but the distinction is meaningful to callers
inspecting metadata directly (absent => nil, empty => []).
Instance Attribute Summary collapse
-
#authorization_servers ⇒ Array<String>?
readonly
Advertised authorization servers;
nilwhen the key is absent,[]when present but empty. -
#resource ⇒ String
readonly
The resource identifier; equals the requested resource origin by code-point.
Instance Method Summary collapse
-
#initialize(resource:, authorization_servers: nil) ⇒ ProtectedResourceMetadata
constructor
A new instance of ProtectedResourceMetadata.
Constructor Details
#initialize(resource:, authorization_servers: nil) ⇒ ProtectedResourceMetadata
Returns a new instance of ProtectedResourceMetadata.
17 18 19 |
# File 'lib/basecamp/oauth/protected_resource_metadata.rb', line 17 def initialize(resource:, authorization_servers: nil) super end |
Instance Attribute Details
#authorization_servers ⇒ Array<String>? (readonly)
Advertised authorization
servers; nil when the key is absent, [] when present but empty.
16 17 18 |
# File 'lib/basecamp/oauth/protected_resource_metadata.rb', line 16 def @authorization_servers end |
#resource ⇒ String (readonly)
The resource identifier; equals the requested resource origin by code-point.
16 17 18 |
# File 'lib/basecamp/oauth/protected_resource_metadata.rb', line 16 def resource @resource end |