Skip to content

Commit 8b73687

Browse files
committedMar 11, 2025
docs: add more symbol document, ignore ts-private fields
1 parent 3662b9e commit 8b73687

40 files changed

+174
-31
lines changed
 

‎docs/jwe/compact/encrypt/classes/CompactEncrypt.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ console.log(jwe)
2727

2828
**new CompactEncrypt**(`plaintext`): [`CompactEncrypt`](CompactEncrypt.md)
2929

30+
[CompactEncrypt](CompactEncrypt.md) constructor
31+
3032
#### Parameters
3133

3234
| Parameter | Type | Description |

‎docs/jwe/flattened/encrypt/classes/FlattenedEncrypt.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ console.log(jwe)
2828

2929
**new FlattenedEncrypt**(`plaintext`): [`FlattenedEncrypt`](FlattenedEncrypt.md)
3030

31+
[FlattenedEncrypt](FlattenedEncrypt.md) constructor
32+
3133
#### Parameters
3234

3335
| Parameter | Type | Description |

‎docs/jwe/general/encrypt/classes/GeneralEncrypt.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ console.log(jwe)
3131

3232
**new GeneralEncrypt**(`plaintext`): [`GeneralEncrypt`](GeneralEncrypt.md)
3333

34+
[GeneralEncrypt](GeneralEncrypt.md) constructor
35+
3436
#### Parameters
3537

3638
| Parameter | Type | Description |

‎docs/jwks/remote/interfaces/ExportedJWKSCache.md

+4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ See [jwksCache](../variables/jwksCache.md).
1212

1313
**jwks**: [`JSONWebKeySet`](../../../types/interfaces/JSONWebKeySet.md)
1414

15+
Current cached JSON Web Key Set
16+
1517
***
1618

1719
### uat
1820

1921
**uat**: `number`
22+
23+
Last updated at timestamp (seconds since epoch)

‎docs/jwks/remote/type-aliases/FetchImplementation.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ See [customFetch](../variables/customFetch.md).
1010

1111
## Parameters
1212

13-
| Parameter | Type |
14-
| ------ | ------ |
15-
| `url` | `string` |
16-
| `options` | \{`headers`: [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers);`method`: `"GET"`;`redirect`: `"manual"`;`signal`: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal); \} |
17-
| `options.headers` | [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers) |
18-
| `options.method` | `"GET"` |
19-
| `options.redirect` | `"manual"` |
20-
| `options.signal` | [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) |
13+
| Parameter | Type | Description |
14+
| ------ | ------ | ------ |
15+
| `url` | `string` | - |
16+
| `options` | \{`headers`: [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers);`method`: `"GET"`;`redirect`: `"manual"`;`signal`: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal); \} | - |
17+
| `options.headers` | [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers) | HTTP Headers |
18+
| `options.method` | `"GET"` | The [request method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) |
19+
| `options.redirect` | `"manual"` | See [Request.redirect](https://developer.mozilla.org/docs/Web/API/Request/redirect) |
20+
| `options.signal` | [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal) | - |
2121

2222
## Returns
2323

‎docs/jws/compact/sign/classes/CompactSign.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ console.log(jws)
2727

2828
**new CompactSign**(`payload`): [`CompactSign`](CompactSign.md)
2929

30+
[CompactSign](CompactSign.md) constructor
31+
3032
#### Parameters
3133

3234
| Parameter | Type | Description |

‎docs/jws/flattened/sign/classes/FlattenedSign.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ console.log(jws)
2727

2828
**new FlattenedSign**(`payload`): [`FlattenedSign`](FlattenedSign.md)
2929

30+
[FlattenedSign](FlattenedSign.md) constructor
31+
3032
#### Parameters
3133

3234
| Parameter | Type | Description |

‎docs/jws/general/sign/classes/GeneralSign.md

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ console.log(jws)
3030

3131
**new GeneralSign**(`payload`): [`GeneralSign`](GeneralSign.md)
3232

33+
[GeneralSign](GeneralSign.md) constructor
34+
3335
#### Parameters
3436

3537
| Parameter | Type | Description |

‎docs/jwt/encrypt/classes/EncryptJWT.md

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ console.log(jwt)
3030

3131
**new EncryptJWT**(`payload`): [`EncryptJWT`](EncryptJWT.md)
3232

33+
[EncryptJWT](EncryptJWT.md) constructor
34+
3335
#### Parameters
3436

3537
| Parameter | Type | Description |

‎docs/jwt/produce/classes/ProduceJWT.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Generic class for JWT producing.
1212

1313
**new ProduceJWT**(`payload`): [`ProduceJWT`](ProduceJWT.md)
1414

15+
[ProduceJWT](ProduceJWT.md) constructor
16+
1517
#### Parameters
1618

1719
| Parameter | Type | Description |

‎docs/jwt/sign/classes/SignJWT.md

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ console.log(jwt)
109109

110110
**new SignJWT**(`payload`): [`SignJWT`](SignJWT.md)
111111

112+
[SignJWT](SignJWT.md) constructor
113+
112114
#### Parameters
113115

114116
| Parameter | Type | Description |

‎docs/jwt/unsecured/classes/UnsecuredJWT.md

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ console.log(payload)
4141

4242
**new UnsecuredJWT**(`payload`): [`UnsecuredJWT`](UnsecuredJWT.md)
4343

44+
[UnsecuredJWT](UnsecuredJWT.md) constructor
45+
4446
#### Parameters
4547

4648
| Parameter | Type | Description |

‎docs/util/errors/classes/JOSEAlgNotAllowed.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JOSEAlgNotAllowed) {
3030

3131
**code**: `string` = `'ERR_JOSE_ALG_NOT_ALLOWED'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JOSEAlgNotAllowed](JOSEAlgNotAllowed.md).

‎docs/util/errors/classes/JOSEError.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ if (err instanceof jose.errors.JOSEError) {
2222

2323
**code**: `string` = `'ERR_JOSE_GENERIC'`
2424

25-
A unique error code for this particular error subclass.
25+
A unique error code for [JOSEError](JOSEError.md).

‎docs/util/errors/classes/JOSENotSupported.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ if (err instanceof jose.errors.JOSENotSupported) {
3131

3232
**code**: `string` = `'ERR_JOSE_NOT_SUPPORTED'`
3333

34-
A unique error code for this particular error subclass.
34+
A unique error code for [JOSENotSupported](JOSENotSupported.md).

‎docs/util/errors/classes/JWEDecryptionFailed.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWEDecryptionFailed) {
3030

3131
**code**: `string` = `'ERR_JWE_DECRYPTION_FAILED'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWEDecryptionFailed](JWEDecryptionFailed.md).

‎docs/util/errors/classes/JWEInvalid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWEInvalid) {
3030

3131
**code**: `string` = `'ERR_JWE_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWEInvalid](JWEInvalid.md).

‎docs/util/errors/classes/JWKInvalid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKInvalid) {
3030

3131
**code**: `string` = `'ERR_JWK_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKInvalid](JWKInvalid.md).

‎docs/util/errors/classes/JWKSInvalid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSInvalid) {
3030

3131
**code**: `string` = `'ERR_JWKS_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSInvalid](JWKSInvalid.md).

‎docs/util/errors/classes/JWKSMultipleMatchingKeys.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSMultipleMatchingKeys) {
3030

3131
**code**: `string` = `'ERR_JWKS_MULTIPLE_MATCHING_KEYS'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSMultipleMatchingKeys](JWKSMultipleMatchingKeys.md).

‎docs/util/errors/classes/JWKSNoMatchingKey.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSNoMatchingKey) {
3030

3131
**code**: `string` = `'ERR_JWKS_NO_MATCHING_KEY'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSNoMatchingKey](JWKSNoMatchingKey.md).

‎docs/util/errors/classes/JWKSTimeout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSTimeout) {
3030

3131
**code**: `string` = `'ERR_JWKS_TIMEOUT'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWKSTimeout](JWKSTimeout.md).

‎docs/util/errors/classes/JWSInvalid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWSInvalid) {
3030

3131
**code**: `string` = `'ERR_JWS_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWSInvalid](JWSInvalid.md).

‎docs/util/errors/classes/JWSSignatureVerificationFailed.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWSSignatureVerificationFailed) {
3030

3131
**code**: `string` = `'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWSSignatureVerificationFailed](JWSSignatureVerificationFailed.md).

‎docs/util/errors/classes/JWTClaimValidationFailed.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The Claim for which the validation failed.
3838

3939
**code**: `string` = `'ERR_JWT_CLAIM_VALIDATION_FAILED'`
4040

41-
A unique error code for this particular error subclass.
41+
A unique error code for [JWTClaimValidationFailed](JWTClaimValidationFailed.md).
4242

4343
***
4444

‎docs/util/errors/classes/JWTExpired.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The Claim for which the validation failed.
4242

4343
**code**: `string` = `'ERR_JWT_EXPIRED'`
4444

45-
A unique error code for this particular error subclass.
45+
A unique error code for [JWTExpired](JWTExpired.md).
4646

4747
***
4848

‎docs/util/errors/classes/JWTInvalid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWTInvalid) {
3030

3131
**code**: `string` = `'ERR_JWT_INVALID'`
3232

33-
A unique error code for this particular error subclass.
33+
A unique error code for [JWTInvalid](JWTInvalid.md).

‎src/jwe/compact/encrypt.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ import { FlattenedEncrypt } from '../flattened/encrypt.js'
2626
* ```
2727
*/
2828
export class CompactEncrypt {
29+
/** @ignore */
2930
private _flattened: FlattenedEncrypt
3031

31-
/** @param plaintext Binary representation of the plaintext to encrypt. */
32+
/**
33+
* {@link CompactEncrypt} constructor
34+
*
35+
* @param plaintext Binary representation of the plaintext to encrypt.
36+
*/
3237
constructor(plaintext: Uint8Array) {
3338
this._flattened = new FlattenedEncrypt(plaintext)
3439
}

‎src/jwe/flattened/encrypt.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,35 @@ import checkKeyType from '../../lib/check_key_type.js'
3636
* ```
3737
*/
3838
export class FlattenedEncrypt {
39+
/** @ignore */
3940
private _plaintext: Uint8Array
4041

42+
/** @ignore */
4143
private _protectedHeader!: types.JWEHeaderParameters | undefined
4244

45+
/** @ignore */
4346
private _sharedUnprotectedHeader!: types.JWEHeaderParameters | undefined
4447

48+
/** @ignore */
4549
private _unprotectedHeader!: types.JWEHeaderParameters | undefined
4650

51+
/** @ignore */
4752
private _aad!: Uint8Array | undefined
4853

54+
/** @ignore */
4955
private _cek!: Uint8Array | undefined
5056

57+
/** @ignore */
5158
private _iv!: Uint8Array | undefined
5259

60+
/** @ignore */
5361
private _keyManagementParameters!: types.JWEKeyManagementHeaderParameters
5462

55-
/** @param plaintext Binary representation of the plaintext to encrypt. */
63+
/**
64+
* {@link FlattenedEncrypt} constructor
65+
*
66+
* @param plaintext Binary representation of the plaintext to encrypt.
67+
*/
5668
constructor(plaintext: Uint8Array) {
5769
if (!(plaintext instanceof Uint8Array)) {
5870
throw new TypeError('plaintext must be an instance of Uint8Array')

‎src/jwe/general/encrypt.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,26 @@ class IndividualRecipient implements Recipient {
9595
* ```
9696
*/
9797
export class GeneralEncrypt {
98+
/** @ignore */
9899
private _plaintext: Uint8Array
99100

101+
/** @ignore */
100102
private _recipients: IndividualRecipient[] = []
101103

104+
/** @ignore */
102105
private _protectedHeader!: types.JWEHeaderParameters
103106

107+
/** @ignore */
104108
private _unprotectedHeader!: types.JWEHeaderParameters
105109

110+
/** @ignore */
106111
private _aad!: Uint8Array
107112

108-
/** @param plaintext Binary representation of the plaintext to encrypt. */
113+
/**
114+
* {@link GeneralEncrypt} constructor
115+
*
116+
* @param plaintext Binary representation of the plaintext to encrypt.
117+
*/
109118
constructor(plaintext: Uint8Array) {
110119
this._plaintext = plaintext
111120
}

‎src/jwks/local.ts

+2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ function clone<T>(obj: T): T {
5656
}
5757

5858
class LocalJWKSet {
59+
/** @ignore */
5960
private _jwks?: types.JSONWebKeySet
6061

62+
/** @ignore */
6163
private _cached: WeakMap<types.JWK, Cache> = new WeakMap()
6264

6365
constructor(jwks: unknown) {

‎src/jwks/remote.ts

+20
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,15 @@ export const customFetch: unique symbol = Symbol()
146146

147147
/** See {@link customFetch}. */
148148
export type FetchImplementation = (
149+
/** URL the request is being made sent to {@link !fetch} as the `resource` argument */
149150
url: string,
151+
/** Options otherwise sent to {@link !fetch} as the `options` argument */
150152
options: {
153+
/** HTTP Headers */
151154
headers: Headers
155+
/** The {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods request method} */
152156
method: 'GET'
157+
/** See {@link !Request.redirect} */
153158
redirect: 'manual'
154159
signal: AbortSignal
155160
},
@@ -272,7 +277,13 @@ export interface RemoteJWKSetOptions {
272277

273278
/** See {@link jwksCache}. */
274279
export interface ExportedJWKSCache {
280+
/**
281+
* Current cached JSON Web Key Set
282+
*/
275283
jwks: types.JSONWebKeySet
284+
/**
285+
* Last updated at timestamp (seconds since epoch)
286+
*/
276287
uat: number
277288
}
278289

@@ -301,24 +312,33 @@ function isFreshJwksCache(input: unknown, cacheMaxAge: number): input is Exporte
301312
}
302313

303314
class RemoteJWKSet {
315+
/** @ignore */
304316
private _url: URL
305317

318+
/** @ignore */
306319
private _timeoutDuration: number
307320

321+
/** @ignore */
308322
private _cooldownDuration: number
309323

324+
/** @ignore */
310325
private _cacheMaxAge: number
311326

327+
/** @ignore */
312328
private _jwksTimestamp?: number
313329

330+
/** @ignore */
314331
private _pendingFetch?: Promise<unknown>
315332

333+
/** @ignore */
316334
private _headers: Headers
317335

318336
private [customFetch]?: FetchImplementation
319337

338+
/** @ignore */
320339
private _local!: ReturnType<typeof createLocalJWKSet>
321340

341+
/** @ignore */
322342
private _cache?: JWKSCacheInput
323343

324344
constructor(url: unknown, options?: RemoteJWKSetOptions) {

‎src/jws/compact/sign.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ import { FlattenedSign } from '../flattened/sign.js'
2626
* ```
2727
*/
2828
export class CompactSign {
29+
/** @ignore */
2930
private _flattened: FlattenedSign
3031

31-
/** @param payload Binary representation of the payload to sign. */
32+
/**
33+
* {@link CompactSign} constructor
34+
*
35+
* @param payload Binary representation of the payload to sign.
36+
*/
3237
constructor(payload: Uint8Array) {
3338
this._flattened = new FlattenedSign(payload)
3439
}

‎src/jws/flattened/sign.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,20 @@ import normalizeKey from '../../lib/normalize_key.js'
3434
* ```
3535
*/
3636
export class FlattenedSign {
37+
/** @ignore */
3738
private _payload: Uint8Array
3839

40+
/** @ignore */
3941
private _protectedHeader!: types.JWSHeaderParameters
4042

43+
/** @ignore */
4144
private _unprotectedHeader!: types.JWSHeaderParameters
4245

43-
/** @param payload Binary representation of the payload to sign. */
46+
/**
47+
* {@link FlattenedSign} constructor
48+
*
49+
* @param payload Binary representation of the payload to sign.
50+
*/
4451
constructor(payload: Uint8Array) {
4552
if (!(payload instanceof Uint8Array)) {
4653
throw new TypeError('payload must be an instance of Uint8Array')

‎src/jws/general/sign.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,17 @@ class IndividualSignature implements Signature {
103103
* ```
104104
*/
105105
export class GeneralSign {
106+
/** @ignore */
106107
private _payload: Uint8Array
107108

109+
/** @ignore */
108110
private _signatures: IndividualSignature[] = []
109111

110-
/** @param payload Binary representation of the payload to sign. */
112+
/**
113+
* {@link GeneralSign} constructor
114+
*
115+
* @param payload Binary representation of the payload to sign.
116+
*/
111117
constructor(payload: Uint8Array) {
112118
this._payload = payload
113119
}

‎src/jwt/encrypt.ts

+16
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,36 @@ import { ProduceJWT } from './produce.js'
3131
* ```
3232
*/
3333
export class EncryptJWT extends ProduceJWT {
34+
/** @ignore */
3435
private _cek!: Uint8Array
3536

37+
/** @ignore */
3638
private _iv!: Uint8Array
3739

40+
/** @ignore */
3841
private _keyManagementParameters!: types.JWEKeyManagementHeaderParameters
3942

43+
/** @ignore */
4044
private _protectedHeader!: types.CompactJWEHeaderParameters
4145

46+
/** @ignore */
4247
private _replicateIssuerAsHeader!: boolean
4348

49+
/** @ignore */
4450
private _replicateSubjectAsHeader!: boolean
4551

52+
/** @ignore */
4653
private _replicateAudienceAsHeader!: boolean
4754

55+
/**
56+
* {@link EncryptJWT} constructor
57+
*
58+
* @param payload The JWT Claims Set object. Defaults to an empty object.
59+
*/
60+
constructor(payload: types.JWTPayload = {}) {
61+
super(payload)
62+
}
63+
4864
/**
4965
* Sets the JWE Protected Header on the EncryptJWT object.
5066
*

‎src/jwt/produce.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ function validateInput(label: string, input: number) {
1515
export class ProduceJWT {
1616
protected _payload!: types.JWTPayload
1717

18-
/** @param payload The JWT Claims Set object. Defaults to an empty object. */
18+
/**
19+
* {@link ProduceJWT} constructor
20+
*
21+
* @param payload The JWT Claims Set object. Defaults to an empty object.
22+
*/
1923
constructor(payload: types.JWTPayload = {}) {
2024
if (!isObject(payload)) {
2125
throw new TypeError('JWT Claims Set MUST be an object')

‎src/jwt/sign.ts

+10
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,18 @@ import { ProduceJWT } from './produce.js'
115115
* ```
116116
*/
117117
export class SignJWT extends ProduceJWT {
118+
/** @ignore */
118119
private _protectedHeader!: types.JWTHeaderParameters
119120

121+
/**
122+
* {@link SignJWT} constructor
123+
*
124+
* @param payload The JWT Claims Set object. Defaults to an empty object.
125+
*/
126+
constructor(payload: types.JWTPayload = {}) {
127+
super(payload)
128+
}
129+
120130
/**
121131
* Sets the JWS Protected Header on the SignJWT object.
122132
*

‎src/jwt/unsecured.ts

+9
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ export interface UnsecuredResult<PayloadType = types.JWTPayload> {
5353
* ```
5454
*/
5555
export class UnsecuredJWT extends ProduceJWT {
56+
/**
57+
* {@link UnsecuredJWT} constructor
58+
*
59+
* @param payload The JWT Claims Set object. Defaults to an empty object.
60+
*/
61+
constructor(payload: types.JWTPayload = {}) {
62+
super(payload)
63+
}
64+
5665
/** Encodes the Unsecured JWT. */
5766
encode(): string {
5867
const header = b64u.encode(JSON.stringify({ alg: 'none' }))

‎src/util/errors.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class JOSEError extends Error {
2727
*/
2828
static code = 'ERR_JOSE_GENERIC'
2929

30-
/** A unique error code for this particular error subclass. */
30+
/** A unique error code for {@link JOSEError}. */
3131
code = 'ERR_JOSE_GENERIC'
3232

3333
/** @ignore */
@@ -66,6 +66,7 @@ export class JWTClaimValidationFailed extends JOSEError {
6666
/** @ignore */
6767
static override code = 'ERR_JWT_CLAIM_VALIDATION_FAILED'
6868

69+
/** A unique error code for {@link JWTClaimValidationFailed}. */
6970
override code = 'ERR_JWT_CLAIM_VALIDATION_FAILED'
7071

7172
/** The Claim for which the validation failed. */
@@ -123,6 +124,7 @@ export class JWTExpired extends JOSEError implements JWTClaimValidationFailed {
123124
/** @ignore */
124125
static override code = 'ERR_JWT_EXPIRED'
125126

127+
/** A unique error code for {@link JWTExpired}. */
126128
override code = 'ERR_JWT_EXPIRED'
127129

128130
/** The Claim for which the validation failed. */
@@ -180,6 +182,7 @@ export class JOSEAlgNotAllowed extends JOSEError {
180182
/** @ignore */
181183
static override code = 'ERR_JOSE_ALG_NOT_ALLOWED'
182184

185+
/** A unique error code for {@link JOSEAlgNotAllowed}. */
183186
override code = 'ERR_JOSE_ALG_NOT_ALLOWED'
184187
}
185188

@@ -211,6 +214,7 @@ export class JOSENotSupported extends JOSEError {
211214
/** @ignore */
212215
static override code = 'ERR_JOSE_NOT_SUPPORTED'
213216

217+
/** A unique error code for {@link JOSENotSupported}. */
214218
override code = 'ERR_JOSE_NOT_SUPPORTED'
215219
}
216220

@@ -241,6 +245,7 @@ export class JWEDecryptionFailed extends JOSEError {
241245
/** @ignore */
242246
static override code = 'ERR_JWE_DECRYPTION_FAILED'
243247

248+
/** A unique error code for {@link JWEDecryptionFailed}. */
244249
override code = 'ERR_JWE_DECRYPTION_FAILED'
245250

246251
/** @ignore */
@@ -276,6 +281,7 @@ export class JWEInvalid extends JOSEError {
276281
/** @ignore */
277282
static override code = 'ERR_JWE_INVALID'
278283

284+
/** A unique error code for {@link JWEInvalid}. */
279285
override code = 'ERR_JWE_INVALID'
280286
}
281287

@@ -306,6 +312,7 @@ export class JWSInvalid extends JOSEError {
306312
/** @ignore */
307313
static override code = 'ERR_JWS_INVALID'
308314

315+
/** A unique error code for {@link JWSInvalid}. */
309316
override code = 'ERR_JWS_INVALID'
310317
}
311318

@@ -336,6 +343,7 @@ export class JWTInvalid extends JOSEError {
336343
/** @ignore */
337344
static override code = 'ERR_JWT_INVALID'
338345

346+
/** A unique error code for {@link JWTInvalid}. */
339347
override code = 'ERR_JWT_INVALID'
340348
}
341349

@@ -366,6 +374,7 @@ export class JWKInvalid extends JOSEError {
366374
/** @ignore */
367375
static override code = 'ERR_JWK_INVALID'
368376

377+
/** A unique error code for {@link JWKInvalid}. */
369378
override code = 'ERR_JWK_INVALID'
370379
}
371380

@@ -396,6 +405,7 @@ export class JWKSInvalid extends JOSEError {
396405
/** @ignore */
397406
static override code = 'ERR_JWKS_INVALID'
398407

408+
/** A unique error code for {@link JWKSInvalid}. */
399409
override code = 'ERR_JWKS_INVALID'
400410
}
401411

@@ -426,6 +436,7 @@ export class JWKSNoMatchingKey extends JOSEError {
426436
/** @ignore */
427437
static override code = 'ERR_JWKS_NO_MATCHING_KEY'
428438

439+
/** A unique error code for {@link JWKSNoMatchingKey}. */
429440
override code = 'ERR_JWKS_NO_MATCHING_KEY'
430441

431442
/** @ignore */
@@ -467,6 +478,7 @@ export class JWKSMultipleMatchingKeys extends JOSEError {
467478
/** @ignore */
468479
static override code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'
469480

481+
/** A unique error code for {@link JWKSMultipleMatchingKeys}. */
470482
override code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS'
471483

472484
/** @ignore */
@@ -505,6 +517,7 @@ export class JWKSTimeout extends JOSEError {
505517
/** @ignore */
506518
static override code = 'ERR_JWKS_TIMEOUT'
507519

520+
/** A unique error code for {@link JWKSTimeout}. */
508521
override code = 'ERR_JWKS_TIMEOUT'
509522

510523
/** @ignore */
@@ -540,6 +553,7 @@ export class JWSSignatureVerificationFailed extends JOSEError {
540553
/** @ignore */
541554
static override code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'
542555

556+
/** A unique error code for {@link JWSSignatureVerificationFailed}. */
543557
override code = 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED'
544558

545559
/** @ignore */

0 commit comments

Comments
 (0)
Please sign in to comment.