@vercel/oidc 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +38 -0
- package/dist/auth-config.d.ts +1 -1
- package/dist/auth-config.js +4 -3
- package/dist/auth-errors.d.ts +16 -0
- package/dist/auth-errors.js +43 -0
- package/dist/get-vercel-oidc-token.d.ts +34 -1
- package/dist/get-vercel-oidc-token.js +3 -3
- package/dist/get-vercel-oidc-token.test.js +122 -4
- package/dist/index-browser.d.ts +2 -0
- package/dist/index-browser.js +12 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +10 -2
- package/dist/token-io.js +1 -1
- package/dist/token-util.d.ts +10 -2
- package/dist/token-util.js +17 -13
- package/dist/token-util.test.js +22 -19
- package/dist/token.d.ts +19 -1
- package/dist/token.js +21 -14
- package/dist/token.test.js +108 -2
- package/docs/README.md +49 -4
- package/docs/classes/AccessTokenMissingError.md +160 -0
- package/docs/classes/RefreshAccessTokenFailedError.md +166 -0
- package/package.json +3 -3
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Class: RefreshAccessTokenFailedError
|
|
2
|
+
|
|
3
|
+
Error thrown when attempting to refresh the authentication token fails.
|
|
4
|
+
This includes cases where no refresh token is available.
|
|
5
|
+
|
|
6
|
+
## Hierarchy
|
|
7
|
+
|
|
8
|
+
- [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)
|
|
9
|
+
|
|
10
|
+
↳ **`RefreshAccessTokenFailedError`**
|
|
11
|
+
|
|
12
|
+
## Table of contents
|
|
13
|
+
|
|
14
|
+
### Constructors
|
|
15
|
+
|
|
16
|
+
- [constructor](RefreshAccessTokenFailedError.md#constructor)
|
|
17
|
+
|
|
18
|
+
### Properties
|
|
19
|
+
|
|
20
|
+
- [message](RefreshAccessTokenFailedError.md#message)
|
|
21
|
+
- [name](RefreshAccessTokenFailedError.md#name)
|
|
22
|
+
- [stack](RefreshAccessTokenFailedError.md#stack)
|
|
23
|
+
- [prepareStackTrace](RefreshAccessTokenFailedError.md#preparestacktrace)
|
|
24
|
+
- [stackTraceLimit](RefreshAccessTokenFailedError.md#stacktracelimit)
|
|
25
|
+
|
|
26
|
+
### Methods
|
|
27
|
+
|
|
28
|
+
- [captureStackTrace](RefreshAccessTokenFailedError.md#capturestacktrace)
|
|
29
|
+
|
|
30
|
+
## Constructors
|
|
31
|
+
|
|
32
|
+
### constructor
|
|
33
|
+
|
|
34
|
+
• **new RefreshAccessTokenFailedError**(`cause?`)
|
|
35
|
+
|
|
36
|
+
#### Parameters
|
|
37
|
+
|
|
38
|
+
| Name | Type |
|
|
39
|
+
| :------- | :-------- |
|
|
40
|
+
| `cause?` | `unknown` |
|
|
41
|
+
|
|
42
|
+
#### Overrides
|
|
43
|
+
|
|
44
|
+
Error.constructor
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[packages/oidc/src/auth-errors.ts:20](https://github.com/vercel/vercel/blob/main/packages/oidc/src/auth-errors.ts#L20)
|
|
49
|
+
|
|
50
|
+
## Properties
|
|
51
|
+
|
|
52
|
+
### message
|
|
53
|
+
|
|
54
|
+
• **message**: `string`
|
|
55
|
+
|
|
56
|
+
#### Inherited from
|
|
57
|
+
|
|
58
|
+
Error.message
|
|
59
|
+
|
|
60
|
+
#### Defined in
|
|
61
|
+
|
|
62
|
+
node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts:1054
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### name
|
|
67
|
+
|
|
68
|
+
• **name**: `string` = `'RefreshAccessTokenFailedError'`
|
|
69
|
+
|
|
70
|
+
#### Overrides
|
|
71
|
+
|
|
72
|
+
Error.name
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[packages/oidc/src/auth-errors.ts:19](https://github.com/vercel/vercel/blob/main/packages/oidc/src/auth-errors.ts#L19)
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### stack
|
|
81
|
+
|
|
82
|
+
• `Optional` **stack**: `string`
|
|
83
|
+
|
|
84
|
+
#### Inherited from
|
|
85
|
+
|
|
86
|
+
Error.stack
|
|
87
|
+
|
|
88
|
+
#### Defined in
|
|
89
|
+
|
|
90
|
+
node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts:1055
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### prepareStackTrace
|
|
95
|
+
|
|
96
|
+
▪ `Static` `Optional` **prepareStackTrace**: (`err`: [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error), `stackTraces`: `CallSite`[]) => `any`
|
|
97
|
+
|
|
98
|
+
#### Type declaration
|
|
99
|
+
|
|
100
|
+
▸ (`err`, `stackTraces`): `any`
|
|
101
|
+
|
|
102
|
+
Optional override for formatting stack traces
|
|
103
|
+
|
|
104
|
+
**`See`**
|
|
105
|
+
|
|
106
|
+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
107
|
+
|
|
108
|
+
##### Parameters
|
|
109
|
+
|
|
110
|
+
| Name | Type |
|
|
111
|
+
| :------------ | :------------------------------------------------------------------------------------------------ |
|
|
112
|
+
| `err` | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
|
|
113
|
+
| `stackTraces` | `CallSite`[] |
|
|
114
|
+
|
|
115
|
+
##### Returns
|
|
116
|
+
|
|
117
|
+
`any`
|
|
118
|
+
|
|
119
|
+
#### Inherited from
|
|
120
|
+
|
|
121
|
+
Error.prepareStackTrace
|
|
122
|
+
|
|
123
|
+
#### Defined in
|
|
124
|
+
|
|
125
|
+
node_modules/.pnpm/@types+node@20.11.0/node_modules/@types/node/globals.d.ts:28
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### stackTraceLimit
|
|
130
|
+
|
|
131
|
+
▪ `Static` **stackTraceLimit**: `number`
|
|
132
|
+
|
|
133
|
+
#### Inherited from
|
|
134
|
+
|
|
135
|
+
Error.stackTraceLimit
|
|
136
|
+
|
|
137
|
+
#### Defined in
|
|
138
|
+
|
|
139
|
+
node_modules/.pnpm/@types+node@20.11.0/node_modules/@types/node/globals.d.ts:30
|
|
140
|
+
|
|
141
|
+
## Methods
|
|
142
|
+
|
|
143
|
+
### captureStackTrace
|
|
144
|
+
|
|
145
|
+
▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
146
|
+
|
|
147
|
+
Create .stack property on a target object
|
|
148
|
+
|
|
149
|
+
#### Parameters
|
|
150
|
+
|
|
151
|
+
| Name | Type |
|
|
152
|
+
| :---------------- | :------------------------------------------------------------------------------------------------------ |
|
|
153
|
+
| `targetObject` | `object` |
|
|
154
|
+
| `constructorOpt?` | [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) |
|
|
155
|
+
|
|
156
|
+
#### Returns
|
|
157
|
+
|
|
158
|
+
`void`
|
|
159
|
+
|
|
160
|
+
#### Inherited from
|
|
161
|
+
|
|
162
|
+
Error.captureStackTrace
|
|
163
|
+
|
|
164
|
+
#### Defined in
|
|
165
|
+
|
|
166
|
+
node_modules/.pnpm/@types+node@20.11.0/node_modules/@types/node/globals.d.ts:21
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"require": "./dist/index.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
"version": "3.1
|
|
20
|
+
"version": "3.2.1",
|
|
21
21
|
"repository": {
|
|
22
22
|
"directory": "packages/oidc",
|
|
23
23
|
"type": "git",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"tinyspawn": "1.3.1",
|
|
31
31
|
"typedoc": "0.24.6",
|
|
32
|
-
"typedoc-plugin-markdown": "
|
|
33
|
-
"typedoc-plugin-mdn-links": "3.
|
|
32
|
+
"typedoc-plugin-markdown": "3.15.2",
|
|
33
|
+
"typedoc-plugin-mdn-links": "3.0.3",
|
|
34
34
|
"typescript": "4.9.5",
|
|
35
35
|
"vitest": "2.0.1"
|
|
36
36
|
},
|