Skip to content

JwtOptions

1 min read

Import: import system.webapi.auth;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

JwtOptions

Native JWT configuration; RS256 uses PEM keys, HS256 requires an explicit 32-byte minimum secret.

public class JwtOptions

issuer

Identity of the token issuer.

public issuer: string

audience

Expected token audience.

public audience: string

signing_key

Private key used to sign tokens; keep it secret.

public signing_key: string

verification_key

Public key used to verify token signatures.

public verification_key: string

algorithm

Signature algorithm name, such as RS256.

public algorithm: JwtAlgorithm

constructor

Creates a JwtOptions with issuer, audience, signing_key, verification_key, algorithm.

public constructor(
    issuer: string,
    audience: string,
    signing_key: string,
    verification_key: string,
    algorithm: JwtAlgorithm = JwtAlgorithm.RS256
)