Class JwtTestUtil

java.lang.Object
me.josephsf.jobportaljosephsfeirtest.util.JwtTestUtil

public class JwtTestUtil extends Object
Utility class for generating JWT tokens for testing purposes.
Since:
2025-05-17
  • Constructor Details

    • JwtTestUtil

      public JwtTestUtil()
  • Method Details

    • generateToken

      public static String generateToken(String username, String... roles)
      Generates a test JWT token for the specified username and roles.
      Parameters:
      username - the username for the token
      roles - the roles to include in the token
      Returns:
      a JWT token string