Class OAuthGrantContext

java.lang.Object
com.revetsec.oauth.server.OAuthGrantContext

@Immutable public final class OAuthGrantContext extends Object
Issuer-created grant facts supplied to the application's continuing authorization policy. This type has no application factory or builder and contains no raw code or refresh credential. Policies must deny any grant type they do not recognize, including types added in a later release. Future client-credentials issuance uses a separate policy interface and namespaced client subjects. The grant management handle is sensitive; release it only to trusted application management code.
Since:
1.0.0
Author:
Mark Allen
  • Method Details

    • getSubject

      Returns the checked issuer-local subject.
      Returns:
      the configured value
      Since:
      1.0.0
    • getClientId

      Returns the exact checked client identifier.
      Returns:
      the configured value
      Since:
      1.0.0
    • getGrantType

      Returns the operation being checked, currently authorization_code or refresh_token. Policies must deny unrecognized types, including future additions.
      Returns:
      the configured value
      Since:
      1.0.0
    • getGrantValue

      Explicitly releases the sensitive grant handle for trusted application management; never log it.
      Returns:
      the configured value
      Since:
      1.0.0
    • getAuthorizedScopesByResource

      Returns the immutable complete checked resource/scope grant.
      Returns:
      the configured value
      Since:
      1.0.0
    • isRefreshTokenPermitted

      Returns whether the checked grant permits refresh.
      Returns:
      the configured value
      Since:
      1.0.0
    • toString

      Redacts all grant facts and the management handle from diagnostics.
      Overrides:
      toString in class Object
      Returns:
      a fixed description
      Since:
      1.0.0