Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
24 lines
911 B
Plaintext
24 lines
911 B
Plaintext
import { AsymmetricAlgorithm, SignatureAlgorithm } from "./jwa.js";
|
|
import { HonoJsonWebKey, SignatureKey } from "./jws.js";
|
|
import { JWTPayload } from "./types.js";
|
|
import { TokenHeader, VerifyOptions, VerifyOptionsWithAlg } from "./jwt.js";
|
|
//#region src/utils/jwt/index.d.ts
|
|
/**
|
|
* @module
|
|
* JWT utility.
|
|
*/
|
|
export declare const Jwt: {
|
|
sign: (payload: JWTPayload, privateKey: SignatureKey, alg?: SignatureAlgorithm) => Promise<string>;
|
|
verify: (token: string, publicKey: SignatureKey, algOrOptions: SignatureAlgorithm | VerifyOptionsWithAlg) => Promise<JWTPayload>;
|
|
decode: (token: string) => {
|
|
header: TokenHeader;
|
|
payload: JWTPayload;
|
|
};
|
|
verifyWithJwks: (token: string, options: {
|
|
keys?: HonoJsonWebKey[];
|
|
jwks_uri?: string;
|
|
verification?: VerifyOptions;
|
|
allowedAlgorithms: readonly AsymmetricAlgorithm[];
|
|
}, init?: RequestInit) => Promise<JWTPayload>;
|
|
};
|
|
//#endregion |