|
| 1 | +[**oidc-react**](../README.md) • **Docs** |
| 2 | + |
| 3 | +*** |
| 4 | + |
| 5 | +[oidc-react](../README.md) / User |
| 6 | + |
| 7 | +# Class: User |
| 8 | + |
| 9 | +## Constructors |
| 10 | + |
| 11 | +### new User() |
| 12 | + |
| 13 | +> **new User**(`args`): [`User`](User.md) |
| 14 | +
|
| 15 | +#### Parameters |
| 16 | + |
| 17 | +• **args** |
| 18 | + |
| 19 | +• **args.access\_token**: `string` |
| 20 | + |
| 21 | +• **args.expires\_at?**: `number` |
| 22 | + |
| 23 | +• **args.id\_token?**: `string` |
| 24 | + |
| 25 | +• **args.profile**: `IdTokenClaims` |
| 26 | + |
| 27 | +• **args.refresh\_token?**: `string` |
| 28 | + |
| 29 | +• **args.scope?**: `string` |
| 30 | + |
| 31 | +• **args.session\_state?**: `null` \| `string` |
| 32 | + |
| 33 | +• **args.token\_type**: `string` |
| 34 | + |
| 35 | +• **args.url\_state?**: `string` |
| 36 | + |
| 37 | +• **args.userState?**: `unknown` |
| 38 | + |
| 39 | +#### Returns |
| 40 | + |
| 41 | +[`User`](User.md) |
| 42 | + |
| 43 | +#### Defined in |
| 44 | + |
| 45 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1285 |
| 46 | + |
| 47 | +## Properties |
| 48 | + |
| 49 | +### access\_token |
| 50 | + |
| 51 | +> **access\_token**: `string` |
| 52 | +
|
| 53 | +The requested access token returned from the OIDC provider. The application can use this token to |
| 54 | +authenticate itself to the secured resource. |
| 55 | + |
| 56 | +#### Defined in |
| 57 | + |
| 58 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1267 |
| 59 | + |
| 60 | +*** |
| 61 | + |
| 62 | +### expires\_at? |
| 63 | + |
| 64 | +> `optional` **expires\_at**: `number` |
| 65 | +
|
| 66 | +The expires at returned from the OIDC provider. |
| 67 | + |
| 68 | +#### Defined in |
| 69 | + |
| 70 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1281 |
| 71 | + |
| 72 | +*** |
| 73 | + |
| 74 | +### id\_token? |
| 75 | + |
| 76 | +> `optional` **id\_token**: `string` |
| 77 | +
|
| 78 | +A JSON Web Token (JWT). Only provided if `openid` scope was requested. |
| 79 | +The application can access the data decoded by using the `profile` property. |
| 80 | + |
| 81 | +#### Defined in |
| 82 | + |
| 83 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1260 |
| 84 | + |
| 85 | +*** |
| 86 | + |
| 87 | +### profile |
| 88 | + |
| 89 | +> **profile**: `IdTokenClaims` |
| 90 | +
|
| 91 | +The claims represented by a combination of the `id_token` and the user info endpoint. |
| 92 | + |
| 93 | +#### Defined in |
| 94 | + |
| 95 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1279 |
| 96 | + |
| 97 | +*** |
| 98 | + |
| 99 | +### refresh\_token? |
| 100 | + |
| 101 | +> `optional` **refresh\_token**: `string` |
| 102 | +
|
| 103 | +An OAuth 2.0 refresh token. The app can use this token to acquire additional access tokens after the |
| 104 | +current access token expires. Refresh tokens are long-lived and can be used to maintain access to resources |
| 105 | +for extended periods of time. |
| 106 | + |
| 107 | +#### Defined in |
| 108 | + |
| 109 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1273 |
| 110 | + |
| 111 | +*** |
| 112 | + |
| 113 | +### scope? |
| 114 | + |
| 115 | +> `optional` **scope**: `string` |
| 116 | +
|
| 117 | +The scopes that the requested access token is valid for. |
| 118 | + |
| 119 | +#### Defined in |
| 120 | + |
| 121 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1277 |
| 122 | + |
| 123 | +*** |
| 124 | + |
| 125 | +### session\_state |
| 126 | + |
| 127 | +> **session\_state**: `null` \| `string` |
| 128 | +
|
| 129 | +The session state value returned from the OIDC provider. |
| 130 | + |
| 131 | +#### Defined in |
| 132 | + |
| 133 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1262 |
| 134 | + |
| 135 | +*** |
| 136 | + |
| 137 | +### state |
| 138 | + |
| 139 | +> `readonly` **state**: `unknown` |
| 140 | +
|
| 141 | +custom state data set during the initial signin request |
| 142 | + |
| 143 | +#### Defined in |
| 144 | + |
| 145 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1283 |
| 146 | + |
| 147 | +*** |
| 148 | + |
| 149 | +### token\_type |
| 150 | + |
| 151 | +> **token\_type**: `string` |
| 152 | +
|
| 153 | +Typically "Bearer" |
| 154 | + |
| 155 | +#### Defined in |
| 156 | + |
| 157 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1275 |
| 158 | + |
| 159 | +*** |
| 160 | + |
| 161 | +### url\_state? |
| 162 | + |
| 163 | +> `readonly` `optional` **url\_state**: `string` |
| 164 | +
|
| 165 | +#### Defined in |
| 166 | + |
| 167 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1284 |
| 168 | + |
| 169 | +## Accessors |
| 170 | + |
| 171 | +### expired |
| 172 | + |
| 173 | +> `get` **expired**(): `undefined` \| `boolean` |
| 174 | +
|
| 175 | +Computed value indicating if the access token is expired. |
| 176 | + |
| 177 | +#### Returns |
| 178 | + |
| 179 | +`undefined` \| `boolean` |
| 180 | + |
| 181 | +#### Defined in |
| 182 | + |
| 183 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1301 |
| 184 | + |
| 185 | +*** |
| 186 | + |
| 187 | +### expires\_in |
| 188 | + |
| 189 | +> `get` **expires\_in**(): `undefined` \| `number` |
| 190 | +
|
| 191 | +Computed number of seconds the access token has remaining. |
| 192 | + |
| 193 | +> `set` **expires\_in**(`value`): `void` |
| 194 | +
|
| 195 | +#### Parameters |
| 196 | + |
| 197 | +• **value**: `undefined` \| `number` |
| 198 | + |
| 199 | +#### Returns |
| 200 | + |
| 201 | +`undefined` \| `number` |
| 202 | + |
| 203 | +#### Defined in |
| 204 | + |
| 205 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1298 |
| 206 | + |
| 207 | +*** |
| 208 | + |
| 209 | +### scopes |
| 210 | + |
| 211 | +> `get` **scopes**(): `string`[] |
| 212 | +
|
| 213 | +Array representing the parsed values from the `scope`. |
| 214 | + |
| 215 | +#### Returns |
| 216 | + |
| 217 | +`string`[] |
| 218 | + |
| 219 | +#### Defined in |
| 220 | + |
| 221 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1303 |
| 222 | + |
| 223 | +## Methods |
| 224 | + |
| 225 | +### toStorageString() |
| 226 | + |
| 227 | +> **toStorageString**(): `string` |
| 228 | +
|
| 229 | +#### Returns |
| 230 | + |
| 231 | +`string` |
| 232 | + |
| 233 | +#### Defined in |
| 234 | + |
| 235 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1304 |
| 236 | + |
| 237 | +*** |
| 238 | + |
| 239 | +### fromStorageString() |
| 240 | + |
| 241 | +> `static` **fromStorageString**(`storageString`): [`User`](User.md) |
| 242 | +
|
| 243 | +#### Parameters |
| 244 | + |
| 245 | +• **storageString**: `string` |
| 246 | + |
| 247 | +#### Returns |
| 248 | + |
| 249 | +[`User`](User.md) |
| 250 | + |
| 251 | +#### Defined in |
| 252 | + |
| 253 | +node\_modules/.pnpm/oidc-client-ts@2.4.1/node\_modules/oidc-client-ts/dist/types/oidc-client-ts.d.ts:1305 |
0 commit comments