Class JWTSAuthenticator<A extends JWTClaimsSet>
- Type Parameters:
A- the JWT claims set type
- All Implemented Interfaces:
Authenticator<TokenCredentials,JWTSAuthentication<A>>
An authenticator implementation that authenticates JWTS token credentials.
The expected token must be a valid JWTS compact string which is not using NoAlgorithm.NONE algorithm.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionJWTSAuthenticator(JWTService jwtService) Creates a JWTS authenticator with the specified JWT service.JWTSAuthenticator(JWTService jwtService, Class<A> type) Creates a JWTS authenticator with the specified JWT service and JWT claims set type.JWTSAuthenticator(JWTService jwtService, Class<A> type, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, JWT claims set type and processed parameters.JWTSAuthenticator(JWTService jwtService, Class<A> type, org.reactivestreams.Publisher<? extends JWK> keys) Creates a JWTS authenticator with the specified JWT service, JWT claims set type and keys.JWTSAuthenticator(JWTService jwtService, Class<A> type, org.reactivestreams.Publisher<? extends JWK> keys, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, JWT claims set type, keys and processed parameters.JWTSAuthenticator(JWTService jwtService, Type type) Creates a JWTS authenticator with the specified JWT service and JWT claims set type.JWTSAuthenticator(JWTService jwtService, Type type, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, JWT claims set type and processed parameters.JWTSAuthenticator(JWTService jwtService, Type type, org.reactivestreams.Publisher<? extends JWK> keys) Creates a JWTS authenticator with the specified JWT service, JWT claims set type and keys.JWTSAuthenticator(JWTService jwtService, Type type, org.reactivestreams.Publisher<? extends JWK> keys, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, JWT claims set type, keys and processed parameters.JWTSAuthenticator(JWTService jwtService, String... processedParameters) Creates a JWTS authenticator with the specified JWT service and processed parameters.JWTSAuthenticator(JWTService jwtService, org.reactivestreams.Publisher<? extends JWK> keys) Creates a JWTS authenticator with the specified JWT service and keys.JWTSAuthenticator(JWTService jwtService, org.reactivestreams.Publisher<? extends JWK> keys, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, keys and processed parameters. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<JWTSAuthentication<A>>authenticate(TokenCredentials credentials) final List<JWTClaimsSetValidator>Returns the list of JWT claims set validators.voidsetValidators(List<JWTClaimsSetValidator> validators) Sets the JWT claims set validators.validate(JWTClaimsSetValidator validator) Adds the specified validator to the JWT claims set.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.security.authentication.Authenticator
failOnDenied, failOnDeniedAndAnonymous, flatMap, map, or
-
Constructor Details
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service.
- Parameters:
jwtService- the JWT service
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service and keys.
- Parameters:
jwtService- the JWT servicekeys- the keys to consider to verify the JWTS
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service and processed parameters.
- Parameters:
jwtService- the JWT serviceprocessedParameters- the parameters processed by the application
-
JWTSAuthenticator
public JWTSAuthenticator(JWTService jwtService, org.reactivestreams.Publisher<? extends JWK> keys, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, keys and processed parameters.
- Parameters:
jwtService- the JWT servicekeys- the keys to consider to verify the JWTSprocessedParameters- the parameters processed by the application
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service and JWT claims set type.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set type
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service and JWT claims set type.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set type
-
JWTSAuthenticator
public JWTSAuthenticator(JWTService jwtService, Class<A> type, org.reactivestreams.Publisher<? extends JWK> keys) Creates a JWTS authenticator with the specified JWT service, JWT claims set type and keys.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set typekeys- the keys to consider to verify the JWTS
-
JWTSAuthenticator
public JWTSAuthenticator(JWTService jwtService, Type type, org.reactivestreams.Publisher<? extends JWK> keys) Creates a JWTS authenticator with the specified JWT service, JWT claims set type and keys.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set typekeys- the keys to consider to verify the JWTS
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service, JWT claims set type and processed parameters.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set typeprocessedParameters- the parameters processed by the application
-
JWTSAuthenticator
Creates a JWTS authenticator with the specified JWT service, JWT claims set type and processed parameters.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set typeprocessedParameters- the parameters processed by the application
-
JWTSAuthenticator
public JWTSAuthenticator(JWTService jwtService, Class<A> type, org.reactivestreams.Publisher<? extends JWK> keys, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, JWT claims set type, keys and processed parameters.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set typekeys- the keys to consider to verify the JWTSprocessedParameters- the parameters processed by the application
-
JWTSAuthenticator
public JWTSAuthenticator(JWTService jwtService, Type type, org.reactivestreams.Publisher<? extends JWK> keys, String... processedParameters) Creates a JWTS authenticator with the specified JWT service, JWT claims set type, keys and processed parameters.
- Parameters:
jwtService- the JWT servicetype- the JWT claims set typekeys- the keys to consider to verify the JWTSprocessedParameters- the parameters processed by the application
-
-
Method Details
-
validate
Adds the specified validator to the JWT claims set.
- Parameters:
validator- the validator to add- Returns:
- the JWTS authenticator
-
setValidators
Sets the JWT claims set validators.
- Parameters:
validators- a list of validators or null to clear the validators
-
getValidators
Returns the list of JWT claims set validators.
- Returns:
- the JWT claims set validators
-
authenticate
public reactor.core.publisher.Mono<JWTSAuthentication<A>> authenticate(TokenCredentials credentials) - Specified by:
authenticatein interfaceAuthenticator<TokenCredentials,JWTSAuthentication<A extends JWTClaimsSet>>
-