PHP code example of dotkernel / dot-authentication-web
1. Go to this page and download the library: Download dotkernel/dot-authentication-web library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dotkernel / dot-authentication-web example snippets
// the authentication event listener interface defined in this package
interface AuthenticationEventListenerInterface extends ListenerAggregateInterface
{
public function onBeforeAuthentication(AuthenticationEvent $e);
public function onAfterAuthentication(AuthenticationEvent $e);
public function onAuthenticationSuccess(AuthenticationEvent $e);
public function onAuthenticationError(AuthenticationEvent $e);
public function onAuthenticationBeforeRender(AuthenticationEvent $e);
public function onBeforeLogout(AuthenticationEvent $e);
public function onAfterLogout(AuthenticationEvent $e);
public function onUnauthorized(AuthenticationEvent $e);
}
//...
class MyAuthenticationEventListener extends AbstractAuthenticationEventListener
{
public function onBeforeAuthentication(AuthenticationEvent $e)
{
// do something...
}
// other event handlers methods
}