Package com.bytedesk.core.utils
Class JwtUtils
java.lang.Object
com.bytedesk.core.utils.JwtUtils
https://github.com/jwtk/jjwt#jws-create-key
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateJwtToken
(String username, String platform) https://github.com/jwtk/jjwt?getSubjectFromJwtToken
(String token) private SecretKey
boolean
validateJwtToken
(String authToken)
-
Field Details
-
jwtSecret
-
jwtExpirationMs
@Value("${bytedesk.jwt.expiration}") private long jwtExpirationMs
-
-
Constructor Details
-
JwtUtils
public JwtUtils()
-
-
Method Details
-
generateJwtToken
https://github.com/jwtk/jjwt?tab=readme-ov-file#creating-a-jwt- Parameters:
username
-- Returns:
-
validateJwtToken
-
getSubjectFromJwtToken
-
secretKey
-