Package org.smallmind.web.jwt
Class JWTCodec
- java.lang.Object
-
- org.smallmind.web.jwt.JWTCodec
-
public class JWTCodec extends Object
-
-
Constructor Summary
Constructors Constructor Description JWTCodec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tdecipher(String jwtToken, Class<T> claimsClass)static <T> Tdecipher(String jwtToken, Class<T> claimsClass, boolean urlSafe)static <T> Tdecode(String jwtToken, JWTKeyMaster keyMaster, Class<T> claimsClass)static <T> Tdecode(String jwtToken, JWTKeyMaster keyMaster, Class<T> claimsClass, boolean urlSafe)static Stringencode(Object claims, JWTKeyMaster keyMaster)static Stringencode(Object claims, JWTKeyMaster keyMaster, boolean urlSafe)static Stringencode(Object claims, JWTKeyMaster keyMaster, boolean urlSafe, Map<String,String> optionalHeaderMap)static Stringencode(Object claims, JWTKeyMaster keyMaster, Map<String,String> optionalHeaderMap)
-
-
-
Method Detail
-
encode
public static String encode(Object claims, JWTKeyMaster keyMaster) throws Exception
- Throws:
Exception
-
encode
public static String encode(Object claims, JWTKeyMaster keyMaster, Map<String,String> optionalHeaderMap) throws Exception
- Throws:
Exception
-
encode
public static String encode(Object claims, JWTKeyMaster keyMaster, boolean urlSafe) throws Exception
- Throws:
Exception
-
encode
public static String encode(Object claims, JWTKeyMaster keyMaster, boolean urlSafe, Map<String,String> optionalHeaderMap) throws Exception
- Throws:
Exception
-
decode
public static <T> T decode(String jwtToken, JWTKeyMaster keyMaster, Class<T> claimsClass) throws Exception
- Throws:
Exception
-
decode
public static <T> T decode(String jwtToken, JWTKeyMaster keyMaster, Class<T> claimsClass, boolean urlSafe) throws Exception
- Throws:
Exception
-
decipher
public static <T> T decipher(String jwtToken, Class<T> claimsClass) throws Exception
- Throws:
Exception
-
-