v0.2.0
Breaking change (Laravel users only)
The purpose of this change is to make AuthUserProvider more testable and support api_token authentication.
App/Providers/AuthServiceProvider.php
Change the registration method.
before
use Kitar\Dynamodb\Model\AuthUserProvider;
...
public function boot()
{
$this->registerPolicies();
Auth::provider('dynamodb', function ($app, array $config) {
return new AuthUserProvider(new $config['model']);
});
}
after
use Kitar\Dynamodb\Model\AuthUserProvider;
...
public function boot()
{
$this->registerPolicies();
Auth::provider('dynamodb', function ($app, array $config) {
return new AuthUserProvider(
$app['hash'],
$config['model'],
$config['api_token_name'] ?? null,
$config['api_token_index'] ?? null
);
});
}
config/auth.php
Optionally, add api_token_name
and api_token_index
if you use this package with api_token authentication.
old
'providers' => [
'users' => [
'driver' => 'dynamodb',
'model' => App\User::class
],
],
new
'providers' => [
'users' => [
'driver' => 'dynamodb',
'model' => App\User::class,
'api_token_name' => 'api_token',
'api_token_index' => 'api_token-index'
],
],