Class ProtectedResourceMetadata
java.lang.Object
com.revetsec.oauth.ProtectedResourceMetadata
Application-configured protected-resource metadata (RFC 9728 sections 2 and 3).
The resource identifier is preserved exactly, including its raw path/query; no URI normalization or I/O occurs.
The app serves
toJson() as application/json and chooses cache policy. This metadata grants no permission.- Since:
- 1.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMutable metadata configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns exact authorization-server issuer strings in configured order, without duplicates.Returns the exact configured resource identifier.Returns supported scope tokens in first-occurrence order.Derives the RFC 9728 well-known location using raw components and stripping a terminating literal path slash.toJson()Returns bounded compact JSON advertising only header bearer presentation.toString()Redacts metadata configuration from diagnostic text.withResource(@NonNull URI resource) Starts metadata for an exact configured resource identifier.
-
Method Details
-
withResource
Starts metadata for an exact configured resource identifier.- Parameters:
resource- the resource URI; HTTPS is required unless loopback HTTP is explicitly allowed- Returns:
- the builder
- Throws:
NullPointerException- if resource is null- Since:
- 1.0.0
-
getResource
Returns the exact configured resource identifier.- Returns:
- the resource
- Since:
- 1.0.0
-
getAuthorizationServers
Returns exact authorization-server issuer strings in configured order, without duplicates.- Returns:
- immutable issuer strings
- Since:
- 1.0.0
-
getScopesSupported
Returns supported scope tokens in first-occurrence order.- Returns:
- immutable scopes
- Since:
- 1.0.0
-
getWellKnownUri
Derives the RFC 9728 well-known location using raw components and stripping a terminating literal path slash. The configured resource identifier is unchanged, including percent escapes, dot segments and query.- Returns:
- the metadata URI
- Since:
- 1.0.0
-
toJson
-
toString
-