Class OAuthServerClientRegistration.Builder
java.lang.Object
com.revetsec.oauth.server.OAuthServerClientRegistration.Builder
- Enclosing class:
OAuthServerClientRegistration
@NotThreadSafe
@CheckReturnValue
public static final class OAuthServerClientRegistration.Builder
extends Object
Replacing, snapshotting registration builder. Null setters reset defaults or clear required values.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionSnapshots exact resource/scopes.Replaces authentication; null resets to public authentication.Sets code permission; null resets to true.build()Builds without invoking application callbacks or performing I/O.clientName(@Nullable String value) Sets optional display text, at most 4096 UTF-16 code units; null clears it.configurationVersion(@Nullable String value) Sets the required nonempty application configuration version, at most 4096 UTF-16 code units; null clears it.introspectionResources(@Nullable Set<@NonNull String> value) Snapshots explicit introspection authority; null resets to empty.redirectUris(@Nullable List<@NonNull URI> value) Snapshots at most 64 distinct exact redirects.Sets refresh permission; null resets to false.toString()Redacts mutable registration configuration from diagnostics.
-
Method Details
-
redirectUris
public @NonNull OAuthServerClientRegistration.Builder redirectUris(@Nullable List<@NonNull URI> value) Snapshots at most 64 distinct exact redirects. Null clears the required browser setting.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
authentication
public @NonNull OAuthServerClientRegistration.Builder authentication(@Nullable OAuthServerClientAuthentication value) Replaces authentication; null resets to public authentication.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
allowedScopesByResource
public @NonNull OAuthServerClientRegistration.Builder allowedScopesByResource(@Nullable Map<@NonNull String, @NonNull Set<@NonNull String>> value) Snapshots exact resource/scopes. Null clears the required browser setting; empty scope sets are allowed.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
refreshTokenPermitted
public @NonNull OAuthServerClientRegistration.Builder refreshTokenPermitted(@Nullable Boolean value) Sets refresh permission; null resets to false.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
authorizationCodePermitted
public @NonNull OAuthServerClientRegistration.Builder authorizationCodePermitted(@Nullable Boolean value) Sets code permission; null resets to true. False clears browser redirects/scopes; re-enabling requires replacement.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
introspectionResources
public @NonNull OAuthServerClientRegistration.Builder introspectionResources(@Nullable Set<@NonNull String> value) Snapshots explicit introspection authority; null resets to empty. Confidential authentication is required at build.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
clientName
Sets optional display text, at most 4096 UTF-16 code units; null clears it.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
configurationVersion
Sets the required nonempty application configuration version, at most 4096 UTF-16 code units; null clears it. Change this value when secret-verifier or key semantics change; callbacks are not fingerprinted. Version equality binds existing interactions and grants. It is not a monotonic revocation epoch; rolling it back can restore old bindings unless management revocation also invalidated them.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
build
Builds without invoking application callbacks or performing I/O.- Returns:
- the immutable registration
- Throws:
IllegalStateException- if version or required browser configuration is missingIllegalArgumentException- if introspection authority has public authentication- Since:
- 1.0.0
-
toString
-