Package com.github.spring.jwt
Class JwtService
- java.lang.Object
-
- com.github.spring.jwt.JwtService
-
public class JwtService extends Object
Class which cracks JWT token against a given secret(randomly generated) key- Author:
- pratapi.patel
-
-
Constructor Summary
Constructors Constructor Description JwtService(String token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMatched(String secretKey)
This method signs the content with the new generated secret key and verifies with the existing signature.
-
-
-
Constructor Detail
-
JwtService
public JwtService(String token)
-
-
Method Detail
-
isMatched
public boolean isMatched(String secretKey)
This method signs the content with the new generated secret key and verifies with the existing signature.- Parameters:
secretKey
-- Returns:
- true if token cracked, false otherwise
-
-