Skip to content

Commit 9ec7b68

Browse files
committed
Adjustments to documentation language
1 parent 4dc28ac commit 9ec7b68

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

docs/guides/api_hmac_keys.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ API. When making requests using HMAC keys, the token should be included in the `
1515
setting the `$authenticatorHeader['hmac']` value in the **app/Config/AuthToken.php** config file.
1616

1717
Tokens are issued with the `generateHmacToken()` method on the user. This returns a
18-
`CodeIgniter\Shield\Entities\AccessToken` instance. These shared keys are saved to the database in plain text. The
19-
`AccessToken` object returned when you generate it will include a `secret` field which will be the '_key_' and a `rawSecretKey`
20-
field that will be the '_secretKey_'. You should display the '_secretKey_' to your user once, so they have a chance to copy
21-
it somewhere safe, as this is the only time you should reveal this key.
18+
`CodeIgniter\Shield\Entities\AccessToken` instance. The `AccessToken` object returned will include a `secret` field
19+
which will be the '**key**' and a `rawSecretKey` field that will be the '**secretKey**'. You should display the
20+
'**secretKey**' to your user immediately, so they have a chance to copy it somewhere safe, as this is the only time
21+
you can reveal this key. The '**key**' and '**sharedKey**' are saved to the database. The '**secretKey**' is stored
22+
encrypted.
2223

2324
The `generateHmacToken()` method requires a name for the token. These are free strings and are often used to identify
2425
the user/device the token was generated from/for, like 'Johns MacBook Air'.

docs/references/authentication/hmac.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ access to your API. These keys typically have a very long expiration time, often
77

88
These are also suitable for use with mobile applications. In this case, the user would register/sign-in
99
with their email/password. The application would create a new access token for them, with a recognizable
10-
name, like John's iPhone 12, and return it to the mobile application, where it is stored and used
10+
name, like "John's iPhone 12", and return it to the mobile application, where it is stored and used
1111
in all future requests.
1212

1313
!!! note
@@ -67,13 +67,13 @@ $token = $user->generateHmacToken('Work Laptop');
6767
```
6868

6969
This creates the keys/tokens using a cryptographically secure random string. The keys operate as shared keys.
70-
This means they are stored as-is in the database. The method returns an instance of
71-
`CodeIgniters\Shield\Authentication\Entities\AccessToken`. The field `secret` is the '_key_' the field `rawSecretKey` is
72-
the shared '_secretKey_'. Both are required to when using this authentication method.
70+
The '**key**' is stored as plain text in the database, the '**secretKey**' is stored encrypted. The method returns an
71+
instance of `CodeIgniters\Shield\Authentication\Entities\AccessToken`. The field `secret` is the '**key**' the field
72+
`rawSecretKey` is the shared '**secretKey**'. Both are required to when using this authentication method.
7373

7474
**The plain text version of these keys should be displayed to the user immediately, so they can copy it for
75-
their use.** It is recommended that after that only the '_key_' field is displayed to a user. If a user loses the
76-
'_secretKey_', they should be required to generate a new set of keys to use.
75+
their use.** It is recommended that after that only the '**key**' field is displayed to a user. If a user loses the
76+
'**secretKey**', they should be required to generate a new set of keys to use.
7777

7878
```php
7979
$token = $user->generateHmacToken('Work Laptop');

0 commit comments

Comments
 (0)