cleaniquecoders / kerberos-auth
Built with Laravel Standalone Package Creator
Requires
- php: >=7.3
- illuminate/auth: ^5.5|^5.6|^5.7|^5.8|^6.0|^7.0
- illuminate/support: ^5.5|^5.6|^5.7|^5.8|^6.0|^7.0
Requires (Dev)
- orchestra/testbench: 3.5.*|3.6.*|3.7.*|3.8.*|4.*|5.*
This package is auto-updated.
Last update: 2022-03-12 07:54:17 UTC
README
Kerberos Auth
This package allowed yout to authenticate your application using Kerberos.
Installation
- In order to install
cleaniquecoders/kerberos-auth
in your Laravel project, just run the composer require command from your terminal:
$ composer require cleaniquecoders/kerberos-auth
- Publish Kerberos Configuration:
$ php artisan vendor:publish --tag="kerberos-auth-config"
- Install the
KerberosMiddleware
inapp/Http/Kernel.php
inweb
group middleware:
protected $middlewareGroups = [ 'web' => [ ... \CleaniqueCoders\KerberosAuth\Http\Middleware\KerberosMiddleware::class, ... ] ];
Usage
In order to enable Kerberos Authentication, you need to enable it. Open up your .env
file and add the following:
KERBEROS_ENABLED=true
You may modify the Kerberos header passed to your application. If not, by default it will be X-REMOTE-USER
:
KERBEROS_HEADER_KEY="X-REMOTE-USER-IDENTIFIER"
By default, Kerberos will use App\Models\User::class
and using email
field to identify user's identity and authenticate to the application. You may want to change this configuration in .env
if you have different model and field want to use for authentication.
KERBEROS_MODEL="\App\User"
KERBEROS_IDENTIFIER="employee_id"
Test
Run the following command:
$ vendor/bin/phpunit --testdox --verbose
Contributing
Thank you for considering contributing to the cleaniquecoders/kerberos-auth
!
Bug Reports
To encourage active collaboration, it is strongly encourages pull requests, not just bug reports. "Bug reports" may also be sent in the form of a pull request containing a failing test.
However, if you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.
Remember, bug reports are created in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the bug report will automatically see any activity or that others will jump to fix it. Creating a bug report serves to help yourself and others start on the path of fixing the problem.
Coding Style
cleaniquecoders/kerberos-auth
follows the PSR-2 coding standard and the PSR-4 autoloading standard.
You may use PHP CS Fixer in order to keep things standardised. PHP CS Fixer configuration can be found in .php_cs
.
License
This package is open-sourced software licensed under the MIT license.