Class StandardJwtRevocationService

java.lang.Object
org.apache.nifi.web.security.jwt.revocation.StandardJwtRevocationService
All Implemented Interfaces:
JwtRevocationService

public class StandardJwtRevocationService extends Object implements JwtRevocationService
Standard JSON Web Token Revocation Service using State Manager
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SCOPE

      private static final Scope SCOPE
    • stateManager

      private final StateManager stateManager
  • Constructor Details

    • StandardJwtRevocationService

      public StandardJwtRevocationService(StateManager stateManager)
  • Method Details

    • deleteExpired

      public void deleteExpired()
      Delete Expired Revocations is synchronized is avoid losing updates from setRevoked()
      Specified by:
      deleteExpired in interface JwtRevocationService
    • isRevoked

      public boolean isRevoked(String id)
      Is JSON Web Token Identifier Revoked based on State Map Status
      Specified by:
      isRevoked in interface JwtRevocationService
      Parameters:
      id - JSON Web Token Identifier
      Returns:
      Revoked Status
    • setRevoked

      public void setRevoked(String id, Instant expiration)
      Set Revoked Status is synchronized to avoid competing changes to the State Map
      Specified by:
      setRevoked in interface JwtRevocationService
      Parameters:
      id - JSON Web Token Identifier
      expiration - Expiration of Revocation Status after which the status record can be removed
    • getStateMap

      private StateMap getStateMap()