dotkernel / dot-controller-plugin-authentication
DotKernel authentication controller plugin
Installs: 1 545
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.2
- dotkernel/dot-authentication: ^2.0
- dotkernel/dot-controller: ^2.0 || ^3.2.1
- laminas/laminas-dependency-plugin: ^1.0 || ^2.0
- laminas/laminas-servicemanager: ^3.3.0
Requires (Dev)
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2022-06-17 09:39:22 UTC
README
Authentication controller plugin.
NOTE
dot-controller-plugin-authentication is archived and will receive no further development!
Installation
Run the following command
$ composer require dotkernel/dot-controller-plugin-authentication
This will also install package dotkernel/dot-controller
and dotkernel/dot-authentication
as dependencies
Enable the module by merging the ConfiProvider
output to your application's configuration, to register the services defined by this module.
Usage
In any controller, you can access this plugin by calling
$this->authentication()->...
This plugin defines 2 methods you can use in your controllers to check for the currently authenticated identity.
$this->authentication()->hasIdentity()
Returns a boolean value indicating if there is an authenticated identity or a guest identity
$this->authentication()->getIdentity()
Returns the current identity as an hydrated object, as defined in the authentication module