You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -62,7 +62,7 @@ class MyUsersRepository implements \ActiveCollab\Authentication\AuthenticatedUse
62
62
63
63
Authorizers are used to authorize user credentials against data that is stored by a particular authentication service (stored users, LDAP/AD, IdP etc).
64
64
65
-
Key authorizer method is `verifyCredentials`. It receives an array with credentials and it is expected to return `ActiveCollab\Authentication\AuthenticatedUser\AuthenticatedUserInterface` instance on successful authorization, or `null` when auhtorization is not successful. Some implementations may decide to throw exceptions, to make a clear distinction between various reasons why authorization failed (user not found, invalid password, user account is temporaly or permanently suspended etc).
65
+
Key authorizer method is `verifyCredentials`. It receives an array with credentials and it is expected to return `ActiveCollab\Authentication\AuthenticatedUser\AuthenticatedUserInterface` instance on successful authorization, or `null` when authorization is not successful. Some implementations may decide to throw exceptions, to make a clear distinction between various reasons why authorization failed (user not found, invalid password, user account is temporarily or permanently suspended etc).
66
66
67
67
Example of Authorizer implementation that fetches user from users repository, and validates user's password:
As you can see from the example above, you can provide multiple handlers for the same event. Following events are available:
284
284
285
-
1.`onUserAuthenticated` - (visit) User is recognized by its session cookie, token etc, so it was authenticated. Arguments provided to the callaback are user instance [AuthenticatedUserInterface], and authentication result [AuthenticationResultInterface].
285
+
1.`onUserAuthenticated` - (visit) User is recognized by its session cookie, token etc, so it was authenticated. Arguments provided to the callback are user instance [AuthenticatedUserInterface], and authentication result [AuthenticationResultInterface].
286
286
1.`onUserAuthorized` (login) User provided valid credentials, and system authorized it. Arguments provided to the callaback are user instance [AuthenticatedUserInterface], and authentication result [AuthenticationResultInterface].
287
287
1.`onUserAuthorizationFailed` (login failed) User tried to authorize, but provided credentials were not valid, or authorization failed due to other reasons (SSO service down, etc). Arguments provided to the callback are user's credentials [array], as well as the failure reason ([Exception] or [Throwable]).
288
288
1.`onUserSet` - User is set - authenticated, authorizer, or app set the user using its own logic. Argument provided to the callback is the user instance [AuthenticatedUserInterface].
@@ -332,7 +332,7 @@ During request handling, authentication can change:
332
332
1. User can log out,
333
333
1. System may request that authentication artifacts (like cookies) are cleaned up.
334
334
335
-
System can communicate these changes by making appropriate authentication transports that encapuslate information about these events available in a value container, and handing them over to `ActiveCollab\Authentication\Middleware\ApplyAuthenticationMiddleware`:
335
+
System can communicate these changes by making appropriate authentication transports that encapsulate information about these events available in a value container, and handing them over to `ActiveCollab\Authentication\Middleware\ApplyAuthenticationMiddleware`:
336
336
337
337
```php
338
338
<?php
@@ -438,7 +438,7 @@ Password policy implements `\JsonSerializable` interface, and can be safely enco
438
438
439
439
### Generating Random Passwords
440
440
441
-
Password strength validator can also be used to prepare new passwords that meed the requirements of provided policies:
441
+
Password strength validator can also be used to prepare new passwords that meet the requirements of provided policies:
0 commit comments