Package com.jms.socialmedia.token
Class JWTService
- java.lang.Object
-
- com.jms.socialmedia.token.JWTService
-
- All Implemented Interfaces:
TokenService
public class JWTService extends Object implements TokenService
-
-
Constructor Summary
Constructors Constructor Description JWTService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
createTokenFromString(String jwt)
String
createTokenString(Token token)
-
-
-
Method Detail
-
createTokenString
public String createTokenString(Token token) throws IOException
- Specified by:
createTokenString
in interfaceTokenService
- Parameters:
token
-- Returns:
- JWT
- Throws:
IOException
-
createTokenFromString
public Token createTokenFromString(String jwt) throws IOException
- Specified by:
createTokenFromString
in interfaceTokenService
- Parameters:
jwt
-- Returns:
- Throws:
io.jsonwebtoken.ExpiredJwtException
io.jsonwebtoken.UnsupportedJwtException
io.jsonwebtoken.MalformedJwtException
io.jsonwebtoken.SignatureException
IllegalArgumentException
IOException
-
-