Copy the .env.example to .env and set the values for:
KAMAR_DS_USERNAMEYour Directory Service UsernameKAMAR_DS_PASSWORDYour Directory Service PasswordKAMAR_DS_FORMATYour Directory Service Format (json|xml)
Do not set Username and Password values in the config file.
Set the values in /config/kamar.php for:
serviceNamee.g. "Kamar Directory Service"serviceVersione.g. 1.0infoUrle.g. "https://www.myschool.co.nz/more-info"privacyStatemente.g. "Change this to a valid privacy statement | All your data belongs to us and will be kept in a top secret vault."optionsThe options to be requested for your directory service
A single route is defined in /app/routes/kamar.php accepting POST requests to /kamar.
The route is handled by /app/Http/Controllers/HandleKamarPost.php.
Base functionality as described in the KAMAR example is implemented here, but you are free to adjust to suit your requirements.
A new kamar middleware group is created in /app/Http/Kernel.php.
The group is the same as the default web group, but has the csrf middleware removed.
You MUST make sure you are authenticating requests to your application.
The example implementation will write json data files at /storage/app/data. These files are not publicly accessible by default.
A RemoveOldDataFiles command is available that will remove files older than 3 days.
A schedule to run the command daily is also configured (/app/Console/Kernel.php)
Run the command manually with php artisan KamarDS:removeOldDataFiles, or configure a cron job to run the task as per the schedule.
For information on configuring a schedule, see https://laravel.com/docs/9.x/scheduling#running-the-scheduler
Run tests with php artisan test
See https://directoryservices.kamar.nz/ for implementation details.