Interface TokenValidator

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TokenValidator
SPI for validating authentication tokens on Atmosphere connections. Implementations are responsible for verifying tokens (JWT, opaque, session-based, etc.) and returning structured results that the AuthInterceptor uses to allow, deny, or trigger refresh flows.

Usage


 framework.interceptor(new AuthInterceptor(token -> {
     var claims = myJwtLib.verify(token);
     return new TokenValidator.Valid(claims.getSubject(), claims);
 }));
 
Since:
4.0
  • Method Details