JwtUtils

object JwtUtils

Utility class for JWT-related operations. This class provides methods for generating and validating JWTs.

Functions

Link copied to clipboard
fun generateJwt(base64Secret: String, claims: Map<String, Any>): String

Generate a JWT for authentication.

Link copied to clipboard
fun isValidJwt(jwt: String, requiredFields: List<String> = emptyList()): Boolean

Check if a string is a valid JWT with the required fields.

Link copied to clipboard

Parse a JWT string and extract its payload claims.