Class JwtTimestampValidator

java.lang.Object
com.codename1.backend.security.oauth2.jwt.JwtTimestampValidator
All Implemented Interfaces:
OAuth2TokenValidator<Jwt>

public final class JwtTimestampValidator extends Object implements OAuth2TokenValidator<Jwt>

Refuses a token past its exp or ahead of its nbf, with a minute's allowance either way for two machines whose clocks disagree.

A token with neither claim passes: whether a token must expire is for the issuer to decide and for another validator to demand.

  • Constructor Details

    • JwtTimestampValidator

      public JwtTimestampValidator()
      With the allowance of 60 seconds.
    • JwtTimestampValidator

      public JwtTimestampValidator(long clockSkewSeconds)
      Parameters:
      clockSkewSeconds - how far past exp or ahead of nbf still passes
  • Method Details