mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Trying to make it work with L52
This commit is contained in:
parent
32d9afedc7
commit
056bf2c559
9 changed files with 421 additions and 409 deletions
|
@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
|
use Illuminate\Foundation\Validation\ValidationException;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
|
@ -16,8 +18,10 @@ class Handler extends ExceptionHandler
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
|
AuthorizationException::class,
|
||||||
HttpException::class,
|
HttpException::class,
|
||||||
ModelNotFoundException::class,
|
ModelNotFoundException::class,
|
||||||
|
ValidationException::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,8 +30,6 @@ class Handler extends ExceptionHandler
|
||||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||||
*
|
*
|
||||||
* @param \Exception $e
|
* @param \Exception $e
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function report(Exception $e)
|
public function report(Exception $e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,18 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Auth\Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
|
||||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
|
||||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
|
||||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
|
||||||
|
|
||||||
class User extends Model implements
|
class User extends Authenticatable
|
||||||
AuthenticatableContract,
|
|
||||||
AuthorizableContract,
|
|
||||||
CanResetPasswordContract
|
|
||||||
{
|
{
|
||||||
use Authenticatable, Authorizable, CanResetPassword;
|
use Authenticatable, Authorizable, CanResetPassword;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.9",
|
"php": ">=5.5.9",
|
||||||
"laravel/framework": "5.1.*",
|
"laravel/framework": "5.2.*",
|
||||||
"james-heinrich/getid3": "^1.9",
|
"james-heinrich/getid3": "^1.9",
|
||||||
"phanan/cascading-config": "~2.0",
|
"phanan/cascading-config": "~2.0",
|
||||||
"barryvdh/laravel-ide-helper": "^2.1",
|
"barryvdh/laravel-ide-helper": "^2.1",
|
||||||
|
@ -16,7 +16,9 @@
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
"mockery/mockery": "0.9.*",
|
"mockery/mockery": "0.9.*",
|
||||||
"phpunit/phpunit": "~4.0",
|
"phpunit/phpunit": "~4.0",
|
||||||
"phpspec/phpspec": "~2.1"
|
"phpspec/phpspec": "~2.1",
|
||||||
|
"symfony/css-selector": "2.8.*|3.0.*",
|
||||||
|
"symfony/dom-crawler": "2.8.*|3.0.*"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
|
660
composer.lock
generated
660
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -3,6 +3,8 @@
|
||||||
return [
|
return [
|
||||||
'tagline' => 'Personal audio streaming service that works.',
|
'tagline' => 'Personal audio streaming service that works.',
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Debug Mode
|
| Application Debug Mode
|
||||||
|
@ -114,13 +116,11 @@ return [
|
||||||
/*
|
/*
|
||||||
* Laravel Framework Service Providers...
|
* Laravel Framework Service Providers...
|
||||||
*/
|
*/
|
||||||
Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
|
|
||||||
Illuminate\Auth\AuthServiceProvider::class,
|
Illuminate\Auth\AuthServiceProvider::class,
|
||||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||||
Illuminate\Bus\BusServiceProvider::class,
|
Illuminate\Bus\BusServiceProvider::class,
|
||||||
Illuminate\Cache\CacheServiceProvider::class,
|
Illuminate\Cache\CacheServiceProvider::class,
|
||||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||||
Illuminate\Routing\ControllerServiceProvider::class,
|
|
||||||
Illuminate\Cookie\CookieServiceProvider::class,
|
Illuminate\Cookie\CookieServiceProvider::class,
|
||||||
Illuminate\Database\DatabaseServiceProvider::class,
|
Illuminate\Database\DatabaseServiceProvider::class,
|
||||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||||
|
@ -171,7 +171,6 @@ return [
|
||||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||||
'Bus' => Illuminate\Support\Facades\Bus::class,
|
|
||||||
'Cache' => Illuminate\Support\Facades\Cache::class,
|
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||||
'Config' => Illuminate\Support\Facades\Config::class,
|
'Config' => Illuminate\Support\Facades\Config::class,
|
||||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||||
|
@ -182,8 +181,6 @@ return [
|
||||||
'File' => Illuminate\Support\Facades\File::class,
|
'File' => Illuminate\Support\Facades\File::class,
|
||||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||||
'Input' => Illuminate\Support\Facades\Input::class,
|
|
||||||
'Inspiring' => Illuminate\Foundation\Inspiring::class,
|
|
||||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||||
'Log' => Illuminate\Support\Facades\Log::class,
|
'Log' => Illuminate\Support\Facades\Log::class,
|
||||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||||
|
|
103
config/auth.php
103
config/auth.php
|
@ -4,64 +4,95 @@ return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Default Authentication Driver
|
| Authentication Defaults
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the authentication driver that will be utilized.
|
| This option controls the default authentication "guard" and password
|
||||||
| This driver manages the retrieval and authentication of the users
|
| reset options for your application. You may change these defaults
|
||||||
| attempting to get access to protected areas of your application.
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => 'web',
|
||||||
|
'passwords' => 'users',
|
||||||
|
],
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| here which uses session storage and the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| Supported: "session", "token"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
'api' => [
|
||||||
|
'driver' => 'token',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| sources which represent each model / table. These sources may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
|
||||||
| Supported: "database", "eloquent"
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Authentication Model
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When using the "Eloquent" authentication driver, we need to know which
|
|
||||||
| Eloquent model should be used to retrieve your users. Of course, it
|
|
||||||
| is often just the "User" model but you may use whatever you like.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'model' => App\Models\User::class,
|
'model' => App\Models\User::class,
|
||||||
|
],
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Authentication Table
|
| Resetting Passwords
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When using the "Database" authentication driver, we need to know which
|
|
||||||
| table should be used to retrieve your users. We have chosen a basic
|
|
||||||
| default value but you may easily change it to any table you like.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'table' => 'users',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Password Reset Settings
|
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may set the options for resetting passwords including the view
|
| Here you may set the options for resetting passwords including the view
|
||||||
| that is your password reset e-mail. You can also set the name of the
|
| that is your password reset e-mail. You may also set the name of the
|
||||||
| table that maintains all of the reset tokens for your application.
|
| table that maintains all of the reset tokens for your application.
|
||||||
|
|
|
|
||||||
|
| You may specify multiple password reset configurations if you have more
|
||||||
|
| than one user table or model in the application and you want to have
|
||||||
|
| separate password reset settings based on the specific user types.
|
||||||
|
|
|
||||||
| The expire time is the number of minutes that the reset token should be
|
| The expire time is the number of minutes that the reset token should be
|
||||||
| considered valid. This security feature keeps tokens short-lived so
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
| they have less time to be guessed. You may change this as needed.
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
'passwords' => [
|
||||||
'password' => [
|
'users' => [
|
||||||
'email' => 'emails.password',
|
'provider' => 'users',
|
||||||
|
'email' => 'auth.emails.password',
|
||||||
'table' => 'password_resets',
|
'table' => 'password_resets',
|
||||||
'expire' => 60,
|
'expire' => 60,
|
||||||
],
|
],
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -108,17 +108,4 @@ return [
|
||||||
|
|
||||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Mail "Pretend"
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When this option is enabled, e-mail will not actually be sent over the
|
|
||||||
| web and will instead be written to your application's logs files so
|
|
||||||
| you may inspect the message. This is great for local development.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'pretend' => env('MAIL_PRETEND', false),
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -53,17 +53,9 @@ return [
|
||||||
'driver' => 'sqs',
|
'driver' => 'sqs',
|
||||||
'key' => 'your-public-key',
|
'key' => 'your-public-key',
|
||||||
'secret' => 'your-secret-key',
|
'secret' => 'your-secret-key',
|
||||||
'queue' => 'your-queue-url',
|
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
|
||||||
'region' => 'us-east-1',
|
|
||||||
],
|
|
||||||
|
|
||||||
'iron' => [
|
|
||||||
'driver' => 'iron',
|
|
||||||
'host' => 'mq-aws-us-east-1.iron.io',
|
|
||||||
'token' => 'your-token',
|
|
||||||
'project' => 'your-project-id',
|
|
||||||
'queue' => 'your-queue-name',
|
'queue' => 'your-queue-name',
|
||||||
'encrypt' => true,
|
'region' => 'us-east-1',
|
||||||
],
|
],
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
|
@ -30,7 +30,7 @@ return [
|
||||||
],
|
],
|
||||||
|
|
||||||
'stripe' => [
|
'stripe' => [
|
||||||
'model' => App\User::class,
|
'model' => App\Models\User::class,
|
||||||
'key' => env('STRIPE_KEY'),
|
'key' => env('STRIPE_KEY'),
|
||||||
'secret' => env('STRIPE_SECRET'),
|
'secret' => env('STRIPE_SECRET'),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue