You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sdk/js/6/controllers/auth/login/index.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,9 @@ description: Authenticate a user
9
9
10
10
Authenticates a user.
11
11
12
-
If this action is successful, all further requests emitted by this SDK instance will be in the name of the authenticated user, until either the authenticated token expires, the [logout](/sdk/js/6/controllers/auth/logout/) action is called, or the [jwt](/sdk/js/6/core-classes/kuzzle/constructor/) property is manually unset.
12
+
If this action is successful, then the [jwt](/sdk/js/6/core-classes/kuzzle/properties) property of this class instance is set to the new authentication token.
13
+
14
+
All further requests emitted by this SDK instance will be on behalf of the authenticated user, until either the authenticated token expires, the [logout](/sdk/js/6/controllers/auth/logout) action is called, or the `jwt` property is manually set to another value.
Copy file name to clipboardExpand all lines: src/sdk/js/6/controllers/auth/refresh-token/index.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,43 +5,46 @@ title: refreshToken
5
5
description: Refresh an authentication token
6
6
---
7
7
8
-
# refreshToken
8
+
# refreshToken
9
9
10
10
<SinceBadgeversion="6.1.0" />
11
11
12
-
Refreshes a valid, non-expired authentication token.
12
+
Refreshes a valid, non-expired authentication token.
13
13
14
-
If this action is successful, all further requests emitted by this SDK instance will use the refreshed authentication token.
14
+
If this action is successful, then the [jwt](/sdk/js/6/core-classes/kuzzle/properties) property of this class instance is set to the new authentication token.
15
15
16
-
## Arguments
16
+
All further requests emitted by this SDK instance will be on behalf of the authenticated user, until either the authenticated token expires, the [logout](/core/sdk/js/6/auth/logout) action is called, or the `jwt` property is manually set to another value.
17
17
18
-
```javascript
18
+
19
+
## Arguments
20
+
21
+
```javascript
19
22
refreshToken ([options])
20
23
```
21
24
22
-
<br/>
25
+
<br/>
23
26
24
-
| Arguments | Type | Description |
27
+
| Arguments | Type | Description |
25
28
|--------------|---------|-------------|
26
29
|`options`| <pre>object</pre> | Query options |
27
30
28
31
29
-
### options
32
+
### options
30
33
31
-
Additional query options
34
+
Additional query options
32
35
33
36
| Property | Type<br/>(default) | Description |
34
37
| -------------- | --------- | ------------- |
35
38
|`expiresIn`| <pre>string</pre> | Expiration time in [ms library](https://www.npmjs.com/package/ms) format. (e.g. `2h`) |
36
39
|`queuable`| <pre>boolean</pre><br/>(`true`)| If true, queues the request during downtime, until connected to Kuzzle again |
37
40
38
-
### expiresIn
41
+
### expiresIn
39
42
40
-
The default value for the `expiresIn` option is defined at server level, in Kuzzle's [configuration file](/core/1/guide/guides/essentials/configuration/).
43
+
The default value for the `expiresIn` option is defined at server level, in Kuzzle's [configuration file](/core/1/guide/guides/essentials/configuration/).
41
44
42
-
## Resolves
45
+
## Resolves
43
46
44
-
The `refreshToken` action resolves to a token object with the following properties:
47
+
The `refreshToken` action resolves to a token object with the following properties:
0 commit comments