Class JwtTestUtil
java.lang.Object
me.josephsf.jobportaljosephsfeirtest.util.JwtTestUtil
Utility class for generating JWT tokens for testing purposes.
- Since:
- 2025-05-17
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateToken(String username, String... roles) Generates a test JWT token for the specified username and roles.
-
Constructor Details
-
JwtTestUtil
public JwtTestUtil()
-
-
Method Details
-
generateToken
Generates a test JWT token for the specified username and roles.- Parameters:
username- the username for the tokenroles- the roles to include in the token- Returns:
- a JWT token string
-