be.looorent.micronaut.security.TokenParser Maven / Gradle / Ivy
package be.looorent.micronaut.security;
/**
* Parses and validates a JWT.
* @author Lorent Lempereur - [email protected]
*/
interface TokenParser {
/**
* @param token a textual JWT
* @return a structured version of the token body that contains the relevant information for you app.
* @throws SecurityException if an error occurs during the parsing
*/
SecurityContext parse(String token) throws SecurityException;
}