/** * Set a specific leeway window in seconds in which the Not Before ("nbf") Claim will still be valid. * Not Before Date is always verified when the value is present. This method overrides the value set with acceptLeeway * * @param leeway the window in seconds in which the Not Before Claim will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptNotBefore(long leeway) throws IllegalArgumentException { assertPositive(leeway); requireClaim(PublicClaims.NOT_BEFORE, leeway); return this; }
/** * Set a specific leeway window in seconds in which the Expires At ("exp") Claim will still be valid. * Expiration Date is always verified when the value is present. This method overrides the value set with acceptLeeway * * @param leeway the window in seconds in which the Expires At Claim will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptExpiresAt(long leeway) throws IllegalArgumentException { assertPositive(leeway); requireClaim(PublicClaims.EXPIRES_AT, leeway); return this; }
/** * Define the default window in seconds in which the Not Before, Issued At and Expires At Claims will still be valid. * Setting a specific leeway value on a given Claim will override this value for that Claim. * * @param leeway the window in seconds in which the Not Before, Issued At and Expires At Claims will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptLeeway(long leeway) throws IllegalArgumentException { assertPositive(leeway); this.defaultLeeway = leeway; return this; }
/** * Set a specific leeway window in seconds in which the Issued At ("iat") Claim will still be valid. * Issued At Date is always verified when the value is present. This method overrides the value set with acceptLeeway * * @param leeway the window in seconds in which the Issued At Claim will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptIssuedAt(long leeway) throws IllegalArgumentException { assertPositive(leeway); requireClaim(PublicClaims.ISSUED_AT, leeway); return this; }
/** * Set a specific leeway window in seconds in which the Issued At ("iat") Claim will still be valid. * Issued At Date is always verified when the value is present. This method overrides the value set with acceptLeeway * * @param leeway the window in seconds in which the Issued At Claim will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptIssuedAt(long leeway) throws IllegalArgumentException { assertPositive(leeway); requireClaim(PublicClaims.ISSUED_AT, leeway); return this; }
/** * Set a specific leeway window in seconds in which the Not Before ("nbf") Claim will still be valid. * Not Before Date is always verified when the value is present. This method overrides the value set with acceptLeeway * * @param leeway the window in seconds in which the Not Before Claim will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptNotBefore(long leeway) throws IllegalArgumentException { assertPositive(leeway); requireClaim(PublicClaims.NOT_BEFORE, leeway); return this; }
/** * Set a specific leeway window in seconds in which the Expires At ("exp") Claim will still be valid. * Expiration Date is always verified when the value is present. This method overrides the value set with acceptLeeway * * @param leeway the window in seconds in which the Expires At Claim will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptExpiresAt(long leeway) throws IllegalArgumentException { assertPositive(leeway); requireClaim(PublicClaims.EXPIRES_AT, leeway); return this; }
/** * Define the default window in seconds in which the Not Before, Issued At and Expires At Claims will still be valid. * Setting a specific leeway value on a given Claim will override this value for that Claim. * * @param leeway the window in seconds in which the Not Before, Issued At and Expires At Claims will still be valid. * @return this same Verification instance. * @throws IllegalArgumentException if leeway is negative. */ @Override public Verification acceptLeeway(long leeway) throws IllegalArgumentException { assertPositive(leeway); this.defaultLeeway = leeway; return this; }