Skip to content

Commit 651902d

Browse files
committed
docs: add note for app/Config/AuthToken.php
1 parent eddc976 commit 651902d

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

docs/references/authentication/hmac.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,19 @@ throw a `RuntimeException`.
208208

209209
## Configuration
210210

211+
Configure **app/Config/AuthToken.php** for your needs.
212+
213+
!!! note
214+
215+
Shield does not expect you use the Access Token Authenticator and HMAC Authenticator
216+
at the same time. Therefore, some Config items are common.
217+
211218
### HMAC Keys Lifetime
212219

213220
HMAC Keys/Tokens will expire after a specified amount of time has passed since they have been used.
214-
This uses the same configuration value as AccessTokens.
215221

216222
By default, this is set to 1 year. You can change this value by setting the `$unusedTokenLifetime`
217-
value in the **app/Config/AuthToken.php** config file. This is in seconds so that you can use the
223+
value. This is in seconds so that you can use the
218224
[time constants](https://codeigniter.com/user_guide/general/common_functions.html#time-constants)
219225
that CodeIgniter provides.
220226

@@ -225,7 +231,7 @@ public $unusedTokenLifetime = YEAR;
225231
### Login Attempt Logging
226232

227233
By default, only failed login attempts are recorded in the `auth_token_logins` table.
228-
This can be modified in the **app/Config/AuthToken.php** config file.
234+
This can be modified by changing the `$recordLoginAttempt` value.
229235

230236
```php
231237
public int $recordLoginAttempt = Auth::RECORD_LOGIN_ATTEMPT_FAILURE;

docs/references/authentication/tokens.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,20 @@ if ($user->tokenCant('forums.manage')) {
116116

117117
## Configuration
118118

119+
Configure **app/Config/AuthToken.php** for your needs.
120+
121+
!!! note
122+
123+
Shield does not expect you use the Access Token Authenticator and HMAC Authenticator
124+
at the same time. Therefore, some Config items are common.
125+
119126
### Access Token Lifetime
120127

121128
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
129+
130+
By default, this is set to 1 year.
131+
You can change this value by setting the `$unusedTokenLifetime` value. This is
132+
in seconds so that you can use the
124133
[time constants](https://codeigniter.com/user_guide/general/common_functions.html#time-constants)
125134
that CodeIgniter provides.
126135

@@ -131,7 +140,8 @@ public $unusedTokenLifetime = YEAR;
131140
### Login Attempt Logging
132141

133142
By default, only failed login attempts are recorded in the `auth_token_logins` table.
134-
This can be modified in the **app/Config/AuthToken.php** config file.
143+
144+
This can be modified by changing the `$recordLoginAttempt` value.
135145

136146
```php
137147
public int $recordLoginAttempt = Auth::RECORD_LOGIN_ATTEMPT_FAILURE;

0 commit comments

Comments
 (0)