Interface OpaAuthorizationConfig.BearerTokenConfig.FileBasedConfig

Enclosing interface:
OpaAuthorizationConfig.BearerTokenConfig

@PolarisImmutable public static interface OpaAuthorizationConfig.BearerTokenConfig.FileBasedConfig
Configuration for file-based bearer tokens
  • Method Details

    • path

      Path path()
      Path to file containing bearer token
    • refreshInterval

      Optional<Duration> refreshInterval()
      How often to refresh file-based bearer tokens (defaults to 5 minutes if not specified)
    • jwtExpirationRefresh

      Optional<Boolean> jwtExpirationRefresh()
      Whether to automatically detect JWT tokens and use their 'exp' field for refresh timing. If true and the token is a valid JWT with an 'exp' claim, the token will be refreshed based on the expiration time minus the buffer, rather than the fixed refresh interval. Defaults to true if not specified.
    • jwtExpirationBuffer

      Optional<Duration> jwtExpirationBuffer()
      Buffer time before JWT expiration to refresh the token. Only used when jwtExpirationRefresh is true and the token is a valid JWT. Defaults to 1 minute if not specified.
    • validate

      default void validate()