Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
25 lines
940 B
Plaintext
25 lines
940 B
Plaintext
import type { JWSHeaderParameters, JWTClaimVerificationOptions, JWTPayload } from '../types';
|
|
import { ProduceJWT } from './produce';
|
|
export interface UnsecuredResult<PayloadType = JWTPayload> {
|
|
payload: PayloadType & JWTPayload;
|
|
header: JWSHeaderParameters;
|
|
}
|
|
/**
|
|
* The UnsecuredJWT class is a utility for dealing with `{ "alg": "none" }` Unsecured JWTs.
|
|
*
|
|
* This class is exported (as a named export) from the main `'jose'` module entry point as well as
|
|
* from its subpath export `'jose/jwt/unsecured'`.
|
|
*
|
|
*/
|
|
export declare class UnsecuredJWT extends ProduceJWT {
|
|
/** Encodes the Unsecured JWT. */
|
|
encode(): string;
|
|
/**
|
|
* Decodes an unsecured JWT.
|
|
*
|
|
* @param jwt Unsecured JWT to decode the payload of.
|
|
* @param options JWT Claims Set validation options.
|
|
*/
|
|
static decode<PayloadType = JWTPayload>(jwt: string, options?: JWTClaimVerificationOptions): UnsecuredResult<PayloadType>;
|
|
}
|