Interface JWTClaimsSetValidator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A JWT claims set validator used to validate a JWTClaimsSet
.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionstatic JWTClaimsSetValidator
Returns a JWT claims set validator that validates that the JWT audience corresponds to trusted audiences.static JWTClaimsSetValidator
Returns a JWT claims set validator that validates that the JWT expiration time is after current date time.static JWTClaimsSetValidator
expiration
(ZonedDateTime time) Returns a JWT claims set validator that validates that the JWT expiration time is after the specified expiration time.static JWTClaimsSetValidator
Returns a JWT claims set validator that validates that the JWT issuer corresponds to the specified trusted issuer.static JWTClaimsSetValidator
Returns a JWT claims set validator that validates that the JWT not before time is after the current date time.static JWTClaimsSetValidator
notBefore
(ZonedDateTime time) Returns a JWT claims set validator that validates that the JWT not before time is after the specified activation time.static JWTClaimsSetValidator
Returns a JWT claims set validator that validates that the JWT subject corresponds to the specified trusted subject.void
validate
(JWTClaimsSet claims) Determines wether the specified claims set is valid.
-
Method Details
-
validate
Determines wether the specified claims set is valid.
- Parameters:
claims
- a JWT claims set- Throws:
InvalidJWTException
- if the specified claims set was invalid
-
issuer
Returns a JWT claims set validator that validates that the JWT issuer corresponds to the specified trusted issuer.
- Parameters:
iss
- the trusted issuer- Returns:
- a JWT claims set validator
-
audience
Returns a JWT claims set validator that validates that the JWT audience corresponds to trusted audiences.
- Parameters:
aud
- a set of trusted audience- Returns:
- a JWT claims set validator
-
subject
Returns a JWT claims set validator that validates that the JWT subject corresponds to the specified trusted subject.
- Parameters:
sub
- the trusted subject- Returns:
- a JWT claims set validator
-
expiration
Returns a JWT claims set validator that validates that the JWT expiration time is after current date time.
- Returns:
- a JWT claims set validator
-
expiration
Returns a JWT claims set validator that validates that the JWT expiration time is after the specified expiration time.
- Parameters:
time
- the expiration time reference- Returns:
- a JWT claims set validator
-
notBefore
Returns a JWT claims set validator that validates that the JWT not before time is after the current date time.
- Returns:
- a JWT claims set validator
-
notBefore
Returns a JWT claims set validator that validates that the JWT not before time is after the specified activation time.
- Parameters:
time
- the activtion time reference- Returns:
- a JWT claims set validator
-