File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
docs/references/authentication Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff 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
10088Each 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
133133By default, only failed login attempts are recorded in the ` auth_token_logins ` table.
You can’t perform that action at this time.
0 commit comments