Skip to content

Commit 26558aa

Browse files
committed
docs: move "Access Token Lifetime" into "Configuration"
1 parent 02f5020 commit 26558aa

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/references/authentication/tokens.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@ $token = $user->getAccessTokenById($id);
8383
$tokens = $user->accessTokens();
8484
```
8585

86-
## Access Token Lifetime
87-
88-
Tokens will expire after a specified amount of time has passed since they have been used.
89-
By default, this is set to 1 year. You can change this value by setting the `$unusedTokenLifetime`
90-
value in the **app/Config/AuthToken.php** config file. This is in seconds so that you can use the
91-
[time constants](https://codeigniter.com/user_guide/general/common_functions.html#time-constants)
92-
that CodeIgniter provides.
93-
94-
```php
95-
public $unusedTokenLifetime = YEAR;
96-
```
97-
9886
## Access Token Scopes
9987

10088
Each token can be given one or more scopes they can be used within. These can be thought of as
@@ -128,6 +116,18 @@ if ($user->tokenCant('forums.manage')) {
128116

129117
## Configuration
130118

119+
### Access Token Lifetime
120+
121+
Tokens will expire after a specified amount of time has passed since they have been used.
122+
By default, this is set to 1 year. You can change this value by setting the `$unusedTokenLifetime`
123+
value in the **app/Config/AuthToken.php** config file. This is in seconds so that you can use the
124+
[time constants](https://codeigniter.com/user_guide/general/common_functions.html#time-constants)
125+
that CodeIgniter provides.
126+
127+
```php
128+
public $unusedTokenLifetime = YEAR;
129+
```
130+
131131
### Login Attempt Logging
132132

133133
By default, only failed login attempts are recorded in the `auth_token_logins` table.

0 commit comments

Comments
 (0)