Class OAuthAuthorizationDecision
java.lang.Object
com.revetsec.oauth.server.OAuthAuthorizationDecision
Trusted application authorization decision; it is not a verified authentication or token proof.
An allowed decision has one exact resource and an issuer-local subject. An explicit empty scope set is
representable for policy denial and never authorizes a zero-scope credential. The issuer must enforce the
interaction/client/server subsets and continuing subject identity before issuance. Applications authenticate
users and protect their login/consent submissions and sessions themselves.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classReplacing decision builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns an explicit application denial, without a subject or grant.Returns the immutable complete resource/scope decision.Returns the application subject, absent for explicit denial.isDenied()Returns whether the application explicitly denied authorization.Returns application refresh permission, subject to the server and client policies.toString()Redacts all decision values from diagnostics.withSubject(@NonNull String subject) Starts a decision for an application-authenticated issuer-local subject.
-
Method Details
-
deniedInstance
Returns an explicit application denial, without a subject or grant.- Returns:
- the denied decision
- Since:
- 1.0.0
-
withSubject
@CheckReturnValue public static @NonNull OAuthAuthorizationDecision.Builder withSubject(@NonNull String subject) Starts a decision for an application-authenticated issuer-local subject.- Parameters:
subject- the exact nonempty subject, at most 1024 UTF-16 code units- Returns:
- the builder
- Throws:
NullPointerException- if subject is nullIllegalArgumentException- if subject is invalid- Since:
- 1.0.0
-
isDenied
-
getSubject
Returns the application subject, absent for explicit denial.- Returns:
- the configured value
- Since:
- 1.0.0
-
getAuthorizedScopesByResource
-
isRefreshTokenPermitted
Returns application refresh permission, subject to the server and client policies.- Returns:
- the configured value
- Since:
- 1.0.0
-
toString
-