Class JWTHandler
- java.lang.Object
-
- idatt2106.group3.backend.Component.JWTHandler
-
public class JWTHandler extends java.lang.Object
Handler class for JWT (JSON Web Tokens)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.springframework.security.core.Authentication
verifyToken(java.lang.String token)
Method for verifying JWT.
-
-
-
Method Detail
-
verifyToken
public static org.springframework.security.core.Authentication verifyToken(java.lang.String token)
Method for verifying JWT. This is important to make sure that a user has the rights to excecute authorised tasks.- Parameters:
token
-- Returns:
- Authentication created from the JWT
-
-