Index

Classes

The CompactEncrypt class is used to build and encrypt Compact JWE strings.

The EncryptJWT class is used to build and encrypt Compact JWE formatted JSON Web Tokens.

The FlattenedEncrypt class is used to build and encrypt Flattened JWE objects.

c
Hono

A generic Error that all other JOSE specific Error subclasses extend.

The SignJWT class is used to build and sign Compact JWS formatted JSON Web Tokens.

The UnsecuredJWT class is a utility for dealing with { "alg": "none" } Unsecured JWTs.

Enums

Functions

The function DefaultContext creates a context object with required modules and request/response headers.

The function exports a context object that includes loaded modules for JOSE and database, with an optional authorization parameter.

Decrypts a Compact JWE.

Decodes a signed JSON Web Token payload. This does not validate the JWT Claims Set types or values. This does not validate the JWS Signature. For a proper Signed JWT Claims Set validation and JWS signature verification use jose.jwtVerify(). For an encrypted JWT Claims Set validation and JWE decryption use jose.jwtDecrypt().

Decrypts a Flattened JWE.

Verifies the JWT format (to be a JWE Compact format), decrypts the ciphertext, validates the JWT Claims Set.

Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the JWT Claims Set.

Interfaces

Recognized Compact JWE Header Parameters, any other Header Members may also be present.

Recognized Compact JWS Header Parameters, any other Header Members may also be present.

Flattened JWE definition.

Recognized Signed JWT Header Parameters, any other Header Members may also be present.

Recognized JWT Claims Set members, any other members may also be present.

Namespaces

Type Aliases

API / tRPC middleware

Utility types

Variables

The ServerModuleAuthInjectorMiddleware function is a TypeScript middleware that injects an authorization token into the request header if it exists in a cookie.

The ServerModuleLoggerMiddleware function is a TypeScript middleware that logs incoming and outgoing requests with timing information.

The function ServerModuleApiAdapter is a TypeScript function that returns a middleware handler for handling API requests with a specified endpoint.

The get_authorization_middleware function is a TypeScript middleware that checks for an authorization header in the request, validates a JSON Web Token (JWT), and returns the payload if it is valid.

The humanize function takes an array of strings representing times and returns a formatted string with commas as delimiters and periods as separators.

v
m
v
tRPC

The function api_role_weight_tester checks if a provided role has sufficient permissions based on its weight compared to a required role.

v
time

The function calculates the time elapsed since a given start time and returns it in a human-readable format.