@@ -72,7 +72,7 @@ instance of `CodeIgniters\Shield\Authentication\Entities\AccessToken`. The field
7272` 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
75+ their use.** It is recommended that after that only the '** key** ' field is displayed to a user. If a user loses the
7676'** secretKey** ', they should be required to generate a new set of keys to use.
7777
7878``` php
@@ -159,8 +159,8 @@ if ($user->hmacTokenCant('forums.manage')) {
159159
160160## HMAC Secret Key Encryption
161161
162- The HMAC Secret Key is stored encrypted. Before you start using HMAC, you will need to set/override the encryption key
163- ` $hmacEncryption['key'] ` in ** app/Config/AuthToken.php** . This should be set using .env and/or system environment variables.
162+ The HMAC Secret Key is stored encrypted. Before you start using HMAC, you will need to set/override the encryption key
163+ ` $hmacEncryption['key'] ` in ** app/Config/AuthToken.php** . This should be set using ** .env** and/or system environment variables.
164164Instructions on how to do that can be found in the
165165[ Setting Your Encryption Key] ( https://codeigniter.com/user_guide/libraries/encryption.html#setting-your-encryption-key )
166166section of the CodeIgniter 4 documentation.
@@ -210,13 +210,13 @@ php spark shield:hmac reencrypt
210210You can (and should) set these values using environment variable and/or the ` .env ` file. To do this you will need to set
211211the values as JSON strings:
212212
213- ``` dotenv
213+ ``` text
214214authtoken.hmacEncryption.key = '{"k1":"hex2bin:923dfab5ddca0c7784c2c388a848a704f5e048736c1a852c862959da62ade8c7","k2":"hex2bin:451df599363b19be1434605fff8556a0bbfc50bede1bb33793dcde4d97fce4b0"}'
215215authtoken.hmacEncryption.driver = '{"k1":"OpenSSL","k2":"OpenSSL"}'
216216authtoken.hmacEncryption.digest = '{"k1":"SHA512","k2":"SHA512"}'
217217authtoken.hmacEncryption.currentKey = k2
218218```
219219
220220Depending on the set length of the Secret Key and the type of encryption used, it is possible for the encrypted value to
221- exceed the database column character limit of 255 characters. If this happens, creation of a new HMAC identity will
221+ exceed the database column character limit of 255 characters. If this happens, creation of a new HMAC identity will
222222throw a ` RuntimeException ` .
0 commit comments