Skip to content

Commit

Permalink
LoginComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
arodu committed Feb 7, 2024
2 parents 6db34ad + 12f4cfa commit 9e99bd0
Show file tree
Hide file tree
Showing 26 changed files with 1,108 additions and 86 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.0', '8.1']
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
db-type: [sqlite, mysql, pgsql]
prefer-lowest: ['']

Expand Down Expand Up @@ -117,4 +117,4 @@ jobs:

- name: Run phpstan
if: success() || failure()
run: composer stan
run: composer stan
75 changes: 66 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
Changelog
=========
Releases for CakePHP 4.3
-------------
Releases for CakePHP 4.5
------------------------
* 11.3.4
* Fix `Detected invalid UTF-8 for field...` issue when storing session data from `Webauthn` in a mongo database.

* 11.3.3
* Add display of unauthorized url in flash message when debug is true

* 11.3.2
* Improve documentation, coding standards

* 11.3.1
* Merge changes from diverged branches, including link generator and keep CakePHP 4.5 compatibility

* 11.3.0
* Require CakePHP ^4.5

Releases for CakePHP 4.4
------------------------
* 11.2.5
* Fix failed tests and code standards

* 11.2.4
* Fix dependencies, require CakePHP 4.4.*

* 11.2.3
* Improved documentation
* Deprecate (broken) compatibility with Linkedin Oauth based connector, they only provide compatibility with OpenID Connect now
* Add Dutch translation by Stefan
* Add `linkGenerator` for emails, useful for API driven apps
* Fix CakePHP 4.5 deprecations
* Fix webauthn loading issues

* 11.2.2
* Fix issue with password rehash with a custom password field

* 11.2.1
* Use UsersUrl and unify url building for login action

* 11.2.0
* Feature/microsoft login by @arodu in #1000
* add more events into login component (before login, after login failure) by @rochamarcelo in #1007
* Add more events into login component (before login, after login failure) by @rochamarcelo in #1007

* 11.1.1
* Use url builder for login redirect

* 11.1.0
* German (de) by @LordSimal
Expand All @@ -15,8 +54,22 @@ Releases for CakePHP 4.3
* Switched tests to new cakephp schema
* Update to PHPUnit 9.5

* There are NO tags for 10.x we jumped from 9.x to 11.x

Releases for CakePHP 4
-------------
----------------------
* 9.3.1
* Add CI tests for PHP 8.1
* Add events `EVENT_BEFORE_LOGIN`, `EVENT_AFTER_LOGIN_FAILURE`

* 9.3.0
* Improve documentation
* Add webauthn as two factor authentication

* 9.2.1
* Improve documentation
* Fix change password issue

* 9.2.0
* Switch to github actions
* New event AfterEmailTokenValidation
Expand All @@ -35,7 +88,7 @@ Releases for CakePHP 4
* Ukrainian (uk) by @yarkm13
* Docs improvements
* Fix DebugKit permissions issues

* 9.0.2
* Added a custom Unauthorized Handler
* If logged user access unauthorized url he is redirected to referer url or '/' if no referer url
Expand All @@ -59,9 +112,13 @@ Releases for CakePHP 4
* Migrated usage of AuthComponent to Authorization/Authentication plugins.

Releases for CakePHP 3
-------------
----------------------
* 8.5.2
* Add optional merge configuration option

* 8.5.1
* Added new `UsersAuthComponent::EVENT_SOCIAL_LOGIN_EXISTING_ACCOUNT`

* 8.5.0
* Added new `UsersAuthComponent::EVENT_BEFORE_SOCIAL_LOGIN_REDIRECT`
* Added finder to get existing social account
Expand All @@ -77,10 +134,10 @@ Releases for CakePHP 3
* 8.2.1
* Fix scope in facebook social login

* 8.2
* 8.2.0
* Removed deprecations for CakePHP 3.7

* 8.1
* 8.1.0
* Added Yubico U2F Authentication

* 8.0.3
Expand Down Expand Up @@ -227,7 +284,7 @@ Releases for CakePHP 3
* Link social accounts in profile

Releases for CakePHP 2
-------------
----------------------

* 2.1.3
* Fixed unit tests for compatibility with CakePHP 2.7
Expand Down
2 changes: 1 addition & 1 deletion Docs/Documentation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ section to check all the customization options
You can create the first user, the super user by issuing the following command

```
bin/cake users addSuperuser
bin/cake users add_superuser
```

Customization
Expand Down
2 changes: 1 addition & 1 deletion Docs/Documentation/Permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ return [
//...... all other rules
[
'controller' => 'Pages',
'action' => ['home', 'contact', 'projects']
'action' => ['home', 'contact', 'projects'],
'bypassAuth' => true,
],
],
Expand Down
1 change: 1 addition & 0 deletions Docs/Documentation/Translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The Plugin is translated into several languages:
* Ukrainian (uk) by @yarkm13
* German (de) by @LordSimal
* Czech (cs_CZ) by @Mapiiik
* Dutch (nl_NL) by @StefanvanR

**Note:** To overwrite the plugin translations, create a file inside your project 'resources/locales//{$lang}/' folder, with the name 'Users.po' and add the strings with the new translations.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prefer-stable": true,
"require": {
"php": ">=7.4.0",
"cakephp/cakephp": "dev-4.next as 4.5.0",
"cakephp/cakephp": "^4.5",
"cakedc/auth": "^7.0",
"cakephp/authorization": "^2.0.0",
"cakephp/authentication": "^2.0.0"
Expand Down
3 changes: 3 additions & 0 deletions config/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
],
'Login' => [
'flashMessage' => false, // bool
'updateLastLogin' => true,
'lastLoginField' => 'last_login',
],
'Registration' => [
// determines if the register is enabled
Expand Down Expand Up @@ -87,6 +89,7 @@
'Profile' => [
// Allow view other users profiles
'viewOthers' => true,
'contain' => [],
],
'Key' => [
'Session' => [
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ parameters:
count: 1
path: src/Controller/UsersController.php

-
message: "#^Parameter \\#1 \\$message of method Cake\\\\Controller\\\\Controller\\:\\:log\\(\\) expects string, Exception given\\.$#"
count: 1
path: src/Controller/UsersController.php

-
message: "#^Parameter \\#1 \\$object of method Cake\\\\Controller\\\\Controller\\:\\:paginate\\(\\) expects Cake\\\\ORM\\\\Query\\|Cake\\\\ORM\\\\Table\\|string\\|null, Cake\\\\Datasource\\\\RepositoryInterface given\\.$#"
count: 1
Expand Down
Binary file added resources/locales/nl_NL/users.mo
Binary file not shown.
Loading

0 comments on commit 9e99bd0

Please sign in to comment.