
# AUD generic driver authentication source for AuthStack

## Installation

Use composer to manage your dependencies and download `authstack/driver-aud-generic`:
```bash
composer require authstack/driver-aud-generic
```

If you are using Laravel 5.5 or higher this package already includes the auto discovery package. 
If for some reason you decided to remove this functionality on your application, add the require services providers in your application config.

Do this by adding the following lines to the 'providers' section on the application config (usually config/app.php):

```php
AuthStack\Driver\AUDGeneric\AUDGenericDriverServiceProvider::class,
```

Publish the package resources.
```bash
php artisan vendor:publish --tag=aud_seeder
```

Before seeding the database make sure your .env file already includes the following keys:
```bash
AUD_URL=https://my-aud-site.com 
AUD_VERIFY_SSL=true     #Enable/Disable this flag to allow Self-Sign Certificates (default:true)
AUD_KEY=mykey           #Set a key to autorize incoming calls from AUD importer (this key must macht to the one on AUD)
```

Seed the database to add the AUD Driver and Driver configs.
```
php artisan db:seed --class AUDGenericDriverSeeder
```

## Mail setup

For recovery/reset AUD password is needed to add the following variables in your .env file
```bash
MAIL_DRIVER=
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=
```

## Extras

You can modify the custom package views by exporting them into your local folder
```bash
php artisan vendor:publish --tag=aud_views
```
