Class OAuthServerClientRegistration
java.lang.Object
com.revetsec.oauth.server.OAuthServerClientRegistration
Immutable application-owned client registration. Identifiers and redirects retain their exact spelling.
This configuration grants no user identity or permission. HTTP redirects are admitted only for the exact
literal loopbacks 127.0.0.1/[::1] or localhost; their use still requires the server's separate explicit opt-ins.
Introspection authority is independent of authorization-code scopes and requires confidential Basic verification.
Carrier bounds admit the server's maximum configurable capacities; the server applies its configured limits.
Security-field or configuration-version changes reject old interaction/code/refresh bindings but do not
themselves revoke already-issued access tokens. Use trusted grant/subject/issuer management revocation
when permanent invalidation is required; restoring an earlier binding can otherwise restore its use.
Construction performs no callback or I/O.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classReplacing, snapshotting registration builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the immutable exact resource/scope registry.Returns the trusted authentication policy.Returns the exact client identifier.Returns optional display text, which applications must escape before rendering.Returns the application version binding for rechecking changed configuration.Returns the explicit resources whose tokens this client may introspect.Returns an immutable redirect list in configured order; URI spelling is unchanged.Returns whether this client may request authorization codes.Returns whether this client permits refresh, subject to server and application approval.toString()Redacts identifiers, callbacks and registration values from diagnostics.withClientId(@NonNull String clientId) Starts a public-client registration permitting authorization codes and no refresh tokens.
-
Method Details
-
withClientId
@CheckReturnValue public static @NonNull OAuthServerClientRegistration.Builder withClientId(@NonNull String clientId) Starts a public-client registration permitting authorization codes and no refresh tokens.- Parameters:
clientId- the exact nonempty identifier, at most 4096 UTF-16 code units- Returns:
- the builder
- Throws:
NullPointerException- if clientId is nullIllegalArgumentException- if clientId is invalid- Since:
- 1.0.0
-
getClientId
Returns the exact client identifier.- Returns:
- the configured value
- Since:
- 1.0.0
-
getRedirectUris
Returns an immutable redirect list in configured order; URI spelling is unchanged.- Returns:
- the configured value
- Since:
- 1.0.0
-
getAuthentication
Returns the trusted authentication policy.- Returns:
- the configured value
- Since:
- 1.0.0
-
getAllowedScopesByResource
-
isRefreshTokenPermitted
Returns whether this client permits refresh, subject to server and application approval.- Returns:
- the configured value
- Since:
- 1.0.0
-
isAuthorizationCodePermitted
Returns whether this client may request authorization codes.- Returns:
- the configured value
- Since:
- 1.0.0
-
getIntrospectionResources
Returns the explicit resources whose tokens this client may introspect.- Returns:
- the configured value
- Since:
- 1.0.0
-
getClientName
Returns optional display text, which applications must escape before rendering.- Returns:
- the configured value
- Since:
- 1.0.0
-
getConfigurationVersion
Returns the application version binding for rechecking changed configuration.- Returns:
- the configured value
- Since:
- 1.0.0
-
toString
-