Skip to content

Commit 27fee69

Browse files
committed
Fixed the upgrading documentation
1 parent d02ccf4 commit 27fee69

1 file changed

Lines changed: 15 additions & 20 deletions

File tree

UPGRADING.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
# Upgrade Guide
22

3-
## Version 1.0.0-beta.8 to 1.0.0-beta.9
4-
5-
### Mandatory Config Changes
6-
7-
#### Config\AuthToken
8-
9-
If you are using the HMAC authentication you need to update the encryption settings in **app/Config/AuthToken.php**.
10-
You will need to update and set the encryption key `$hmacEncryptionKey`. This should be set using .env and/or system
11-
environment variables. Instructions on how to do that can be found in the
12-
[Setting Your Encryption Key](https://codeigniter.com/user_guide/libraries/encryption.html#setting-your-encryption-key)
13-
section of the CodeIgniter 4 documentation.
14-
15-
You also may wish to adjust the default Driver `$hmacEncryptionDriver` and the default Digest `$hmacEncryptionDigest`,
16-
these currently default to `'OpenSSL'` and `'SHA512'` respectively.
17-
18-
### Database Migrations
19-
20-
After updating the `$hmacEncryptionKey` value, you will need to run `php spark migrate --all` in order to encrypt any
21-
existing HMAC tokens.
22-
233
## Version 1.0.0-beta.7 to 1.0.0-beta.8
244

255
### Mandatory Config Changes
@@ -52,6 +32,17 @@ The following items have been added. Copy the properties in **src/Config/Auth.ph
5232
- `permission_denied` and `group_denied` are added to `Config\Auth::$redirects`.
5333
- `permissionDeniedRedirect()` and `groupDeniedRedirect()` are added.
5434

35+
#### Config\AuthToken
36+
37+
If you are using the HMAC authentication you need to update the encryption settings in **app/Config/AuthToken.php**.
38+
You will need to update and set the encryption key `$hmacEncryptionKey`. This should be set using .env and/or system
39+
environment variables. Instructions on how to do that can be found in the
40+
[Setting Your Encryption Key](https://codeigniter.com/user_guide/libraries/encryption.html#setting-your-encryption-key)
41+
section of the CodeIgniter 4 documentation.
42+
43+
You also may wish to adjust the default Driver `$hmacEncryptionDriver` and the default Digest `$hmacEncryptionDigest`,
44+
these currently default to `'OpenSSL'` and `'SHA512'` respectively.
45+
5546
### Fix Custom Filter If extends `AbstractAuthFilter`
5647

5748
If you have written a custom filter that extends `AbstractAuthFilter`, now you need to add and implement the `redirectToDeniedUrl()` method to your custom filter.
@@ -67,6 +58,10 @@ protected function redirectToDeniedUrl(): RedirectResponse
6758
->with('error', lang('Auth.notEnoughPrivilege'));
6859
}
6960
```
61+
### Database Migrations
62+
63+
After updating the `$hmacEncryptionKey` value, you will need to run `php spark migrate --all` in order to encrypt any
64+
existing HMAC tokens.
7065

7166
## Version 1.0.0-beta.6 to 1.0.0-beta.7
7267

0 commit comments

Comments
 (0)