laborci / mikauth-eternity
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/laborci/mikauth-eternity
Requires
- php: >=7.0
- mashape/unirest-php: ^3.0
This package is auto-updated.
Last update: 2020-08-23 15:20:28 UTC
README
Eternity module for handling MIK-AUTH
copy the config file into your global configs, add it to your config builder
'mik-auth' => include "global/mik-auth.php",
Add MikAuthEternity to the ServiceContainer
\MikAuthEternity\Services::register([Config::class, 'mik_auth']);
finally add auth paths to your router
$router->get('/auth/login', [MikAuthRedirect::class, 'login'])();
$router->get('/auth/success/{token}', [MikAuthRedirect::class, 'success'])();
$router->pipe(MikAuthCheckMiddleware::class);
$router->get('/auth/logout', [MikAuthRedirect::class, 'logout'])();