Class OAuthAuthorizationDecision.Builder
java.lang.Object
com.revetsec.oauth.server.OAuthAuthorizationDecision.Builder
- Enclosing class:
OAuthAuthorizationDecision
@NotThreadSafe
@CheckReturnValue
public static final class OAuthAuthorizationDecision.Builder
extends Object
Replacing decision builder. Null scope maps clear a required setting; null refresh permission resets false.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Details
-
authorizedScopesByResource
public @NonNull OAuthAuthorizationDecision.Builder authorizedScopesByResource(@Nullable Map<@NonNull String, @NonNull Set<@NonNull String>> value) Snapshots a complete one-resource decision. An empty scope set is retained; null clears the required map.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
refreshTokenPermitted
Sets application refresh permission; null resets to false.- Parameters:
value- the replacement value, or null to reset- Returns:
- this builder
- Since:
- 1.0.0
-
build
Builds a trusted app decision without authentication or I/O.- Returns:
- the immutable decision
- Throws:
IllegalStateException- if the resource/scope map is missing- Since:
- 1.0.0
-
toString
-