Package org.skr.common.util
Class JwtUtil
java.lang.Object
org.skr.common.util.JwtUtil
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JwtUtil
public JwtUtil()
-
-
Method Details
-
encode
Encode a JWT token- Parameters:
subject- content to encode to JWT tokenexpiration- expiration time in minutes, if 0 never expired.secret- used to encode token- Returns:
- encoded string
-
decode
Decode a JWT token- Parameters:
token- JWT token to decodesecret- used to decode token- Returns:
- decoded content
-