Package-level declarations

Types

Link copied to clipboard
class ExpiredJwtException(val header: JwtHeader, val claims: JwtPayload, message: String) : JwtException

Thrown when a JWT's exp (expiration time) claim indicates the token has already expired.

Link copied to clipboard
class IncorrectClaimException(val claimName: String, val expected: Any?, val actual: Any?) : JwtException

Thrown when a claim is present in the token but its value does not match the expected value.

Link copied to clipboard
open class JwtException(message: String, cause: Throwable? = null) : Exception

Base class for all exceptions thrown by the KJWT library.

Link copied to clipboard
class MalformedJwkException(message: String, cause: Throwable? = null) : JwtException

Thrown when a JWK JSON object is structurally invalid or is missing one or more required fields needed to reconstruct the key.

Link copied to clipboard
class MalformedJwtException(message: String, cause: Throwable? = null) : JwtException

Thrown when a JWT string is structurally invalid, such as having the wrong number of parts, containing invalid Base64URL encoding, or being unparseable as JSON.

Link copied to clipboard
class MissingClaimException(val claimName: String) : JwtException

Thrown when a required claim is absent from the token's payload.

Link copied to clipboard
class MissingHeaderException(val headerName: String) : JwtException

Thrown when a required header parameter is absent from the token's header.

Link copied to clipboard
class PrematureJwtException(val header: JwtHeader, val claims: JwtPayload, message: String) : JwtException

Thrown when a JWT's nbf (not-before) claim indicates the token is not yet valid.

Link copied to clipboard
class SignatureException(message: String, cause: Throwable? = null) : JwtException

Thrown when signature verification of a JWS token fails or when decryption of a JWE token fails, indicating the token may have been tampered with or was encrypted with a different key.

Link copied to clipboard
class UnsupportedJwtException(message: String, cause: Throwable? = null) : JwtException

Thrown when a token uses an algorithm, key type, or feature that is not supported by this library.