Interface OAuthGrantPolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Continuing application authorization policy, invoked outside store transactions at approval, code exchange
and refresh. Implementations must be thread safe and honor the remaining budget. Decisions must retain the
checked subject and may only narrow scope/resource/refresh authority. Denial terminates authorization.
Policies must explicitly deny grant types they do not recognize; never treat an unknown type as approval.
Future client-credentials issuance requires a separate policy interface and namespaced client subjects.
Null, nonfatal exceptions and exhausted budgets are unavailable service failures. A returned decision that
changes the checked subject or widens resource/scope/refresh authority is an application configuration fault.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionauthorizeGrant(@NonNull OAuthGrantContext context, @NonNull Duration remainingTime) Rechecks application permission against issuer-checked grant facts.
-
Method Details
-
authorizeGrant
@NonNull OAuthAuthorizationDecision authorizeGrant(@NonNull OAuthGrantContext context, @NonNull Duration remainingTime) Rechecks application permission against issuer-checked grant facts.- Parameters:
context- checked grant facts, with no raw authorization code or refresh credentialremainingTime- the cooperative remaining operation budget- Returns:
- the application decision
- Since:
- 1.0.0
-