diff --git a/.env.example b/.env.example index 180ab42..5bc083c 100644 --- a/.env.example +++ b/.env.example @@ -38,3 +38,5 @@ DOCUMENT_SEQUENCE_LENGTH=6 LAYOUT_ADMIN=default LAYOUT_PUBLIC=default + +JWT_SECRET= diff --git a/app/Console/Commands/MakeJwtTokenCommand.php b/app/Console/Commands/MakeJwtTokenCommand.php new file mode 100644 index 0000000..3a908a8 --- /dev/null +++ b/app/Console/Commands/MakeJwtTokenCommand.php @@ -0,0 +1,61 @@ +laravel->environmentFilePath(), preg_replace( + $this->keyReplacementPattern(), + 'JWT_SECRET=' . $key, + file_get_contents($this->laravel->environmentFilePath()) + )); + + $this->info("jwt-auth secret [$key] set successfully."); + } + + /** + * Get a regex pattern that will match env JWT_SECRET with any random key. + * + * @return string + */ + protected function keyReplacementPattern() + { + $escaped = preg_quote('=' . $this->laravel['config']['jwt.secret'], '/'); + + return "/^JWT_SECRET{$escaped}/m"; + } +} diff --git a/app/Console/Commands/ReloadAllCommand.php b/app/Console/Commands/ReloadAllCommand.php index bdeb138..d8beac0 100644 --- a/app/Console/Commands/ReloadAllCommand.php +++ b/app/Console/Commands/ReloadAllCommand.php @@ -39,9 +39,7 @@ public function handle() $this->call('reload:cache'); $this->call('reload:db'); $this->call('storage:link'); - $this->call('passport:install', [ - '--force' => true, - ]); + $this->call('make:jwt'); if ($this->option('dev')) { $this->call('db:seed', [ diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 21c6bb6..2505ac7 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,9 +13,10 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - \App\Console\Commands\ReloadAllCommand::class, - \App\Console\Commands\ReloadCacheCommand::class, - \App\Console\Commands\ReloadDbCommand::class, + Commands\MakeJwtTokenCommand::class, + Commands\ReloadAllCommand::class, + Commands\ReloadCacheCommand::class, + Commands\ReloadDbCommand::class, ]; /** diff --git a/app/Http/Controllers/Api/Auth/ForgotPasswordController.php b/app/Http/Controllers/Api/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..534d215 --- /dev/null +++ b/app/Http/Controllers/Api/Auth/ForgotPasswordController.php @@ -0,0 +1,37 @@ +middleware('guest'); + } + + public function __invoke(Request $request) + { + $this->validateEmail($request); + + // We will send the password reset link to this user. Once we have attempted + // to send the link, we will examine the response then see the message we + // need to show to the user. Finally, we'll send out a proper response. + $response = $this->broker()->sendResetLink( + $request->only('email') + ); + + return Password::RESET_LINK_SENT == $response + ? response()->api([], 'Reset link sent to your email.') + : response()->api([], 'Unable to send reset link'); + } +} diff --git a/app/Http/Controllers/Api/Auth/LoginController.php b/app/Http/Controllers/Api/Auth/LoginController.php new file mode 100644 index 0000000..593fca1 --- /dev/null +++ b/app/Http/Controllers/Api/Auth/LoginController.php @@ -0,0 +1,26 @@ +only('email', 'password'); + + try { + if (! $token = JWTAuth::attempt($credentials)) { + return response()->api([], 'Invalid Credentials.', false, 401); + } + } catch (JWTException $e) { + return response()->api([], 'Could not create token.', false, 500); + } + + return response()->api($token); + } +} diff --git a/app/Http/Controllers/Api/Auth/LogoutController.php b/app/Http/Controllers/Api/Auth/LogoutController.php new file mode 100644 index 0000000..2b20c67 --- /dev/null +++ b/app/Http/Controllers/Api/Auth/LogoutController.php @@ -0,0 +1,17 @@ +api([], 'You have sucessfully logout.'); + } +} diff --git a/app/Http/Controllers/Api/Auth/RegisterController.php b/app/Http/Controllers/Api/Auth/RegisterController.php new file mode 100644 index 0000000..9af688b --- /dev/null +++ b/app/Http/Controllers/Api/Auth/RegisterController.php @@ -0,0 +1,33 @@ +validate($request, [ + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255|unique:users', + 'password' => 'required|string|min:6|confirmed', + ]); + + $user = User::create([ + 'name' => $request->get('name'), + 'email' => $request->get('email'), + 'password' => bcrypt($request->get('password')), + ]); + + event(new Registered($user)); + + $token = JWTAuth::fromUser($user); + + return response()->api($token, 'Registration successful.', true, 201); + } +} diff --git a/app/Http/Controllers/Api/Manage/UserController.php b/app/Http/Controllers/Api/Manage/UserController.php index 4295320..21add38 100644 --- a/app/Http/Controllers/Api/Manage/UserController.php +++ b/app/Http/Controllers/Api/Manage/UserController.php @@ -4,8 +4,8 @@ use App\Http\Controllers\Controller; use App\Models\User; -use Illuminate\Http\Request; use Illuminate\Auth\Events\Registered; +use Illuminate\Http\Request; class UserController extends Controller { @@ -39,7 +39,8 @@ public function store(Request $request) 'password' => bcrypt($data['password']), ]); event(new Registered($user)); - $user->syncRoles([$request->role]); + $user->syncRoles($request->roles); + return response()->api([], __('User successfully stored.'), true, 201); } @@ -53,12 +54,12 @@ public function store(Request $request) public function show($id) { $user = User::details()->findByHashSlug($id); - + /** * @todo should have a transformer to do this. */ - $user = collect($user->only('name', 'email', 'roles_to_string', 'roles')); - $roles = $user->get('roles')->mapWithKeys(function($role){ + $user = collect($user->only('name', 'email', 'roles_to_string', 'roles')); + $roles = $user->get('roles')->mapWithKeys(function ($role) { return [$role->id => $role->name]; }); $user->put('roles', $roles); @@ -77,12 +78,12 @@ public function show($id) public function update(Request $request, $id) { $this->validate($request, [ - 'name' => 'required|string|max:255', + 'name' => 'required|string|max:255', ]); $fields = $request->only('name'); - if(!empty($request->input('password'))) { + if (! empty($request->input('password'))) { $this->validate($request, [ 'password' => 'required|string|min:6|confirmed', ]); diff --git a/app/Http/Controllers/Api/User/ProfileController.php b/app/Http/Controllers/Api/User/ProfileController.php new file mode 100644 index 0000000..6d2a853 --- /dev/null +++ b/app/Http/Controllers/Api/User/ProfileController.php @@ -0,0 +1,62 @@ +api(auth()->user()->only('name', 'email', 'hashslug')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index a6d81dc..efca589 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -36,7 +36,6 @@ class Kernel extends HttpKernel \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \Spatie\Referer\CaptureReferer::class, - \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class, ], 'api' => [ @@ -59,14 +58,16 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, - 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, - 'minify' => \App\Http\Middleware\MinifyHtml::class, + 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, + 'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class, + 'minify' => \App\Http\Middleware\MinifyHtml::class, + 'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class, + 'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class, ]; } diff --git a/app/Models/User.php b/app/Models/User.php index 7b63c90..e4b6965 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -11,14 +11,13 @@ use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Laravel\Passport\HasApiTokens; use Spatie\MediaLibrary\HasMedia\Interfaces\HasMediaConversions; use Spatie\Permission\Traits\HasRoles; class User extends Authenticatable implements HasMediaConversions { - use HasApiTokens, HasProfile, HasMediaExtended, - HasThumbnail, HasRoles, HasSlugExtended, + use HasProfile, HasMediaExtended, + HasThumbnail, HasRoles, HasSlugExtended, LogsActivityExtended, Notifiable, SoftDeletes, HasDatatable; @@ -58,7 +57,7 @@ class User extends Authenticatable implements HasMediaConversions * @var array */ protected $hidden = [ - 'password', 'remember_token' + 'password', 'remember_token', ]; /** @@ -67,12 +66,12 @@ class User extends Authenticatable implements HasMediaConversions * @var array */ protected $datatable = [ - 'name', 'email', 'hashslug' + 'name', 'email', 'hashslug', ]; /** * Get roles as string via method. - * + * * @return string */ public function rolesToString() @@ -82,7 +81,7 @@ public function rolesToString() /** * Get roles as a string via accessor. - * + * * @return string */ public function getRolesToStringAttribute() @@ -92,7 +91,7 @@ public function getRolesToStringAttribute() public function scopeDetails($query) { - return $query->with(['roles' => function($query){ + return $query->with(['roles' => function ($query) { return $query->select('id', 'name'); }]); } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 738197f..1c3915a 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Laravel\Passport\Passport; class AuthServiceProvider extends ServiceProvider { @@ -22,7 +21,5 @@ class AuthServiceProvider extends ServiceProvider public function boot() { $this->registerPolicies(); - - Passport::routes(); } } diff --git a/app/Traits/HasDatatable.php b/app/Traits/HasDatatable.php index 5922241..f734908 100644 --- a/app/Traits/HasDatatable.php +++ b/app/Traits/HasDatatable.php @@ -4,28 +4,29 @@ trait HasDatatable { - /** - * Get Datatable Fields to be display. - * - * @return array - */ - public function getDatatableFields() : array - { - if (! isset($this->datatable)) { - return ['*']; - } + /** + * Get Datatable Fields to be display. + * + * @return array + */ + public function getDatatableFields(): array + { + if (! isset($this->datatable)) { + return ['*']; + } - return $this->datatable; - } - - /** - * Datatable scope. - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @return \Illuminate\Database\Eloquent\Builder - */ - public function scopeDatatable($query) - { - return $query->select($this->getDatatableFields()); - } -} \ No newline at end of file + return $this->datatable; + } + + /** + * Datatable scope. + * + * @param \Illuminate\Database\Eloquent\Builder $query + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeDatatable($query) + { + return $query->select($this->getDatatableFields()); + } +} diff --git a/composer.json b/composer.json index aec3ad0..e5668b0 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "fideloper/proxy": "~4.0", "hashids/hashids": "^2.0", "laravel/framework": "5.6.*", - "laravel/passport": "^6.0", "laravel/tinker": "~1.0", "predis/predis": "^1.1", "softon/sweetalert": "^1.0", @@ -33,6 +32,7 @@ "spatie/laravel-sluggable": "^2.1", "thepinecode/i18n": "^0.2.0", "tightenco/ziggy": "^0.6.6", + "tymon/jwt-auth": "^0.5.12", "yajra/laravel-datatables": "^1.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 203e9e5..ae43e66 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "c12588dbb03a72e1f7a9cc557fcfa5eb", + "content-hash": "8635235aef8e18815c0dda68b767ceb7", "packages": [ { "name": "anahkiasen/underscore-php", @@ -310,69 +310,6 @@ ], "time": "2018-02-10T19:00:08+00:00" }, - { - "name": "defuse/php-encryption", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/defuse/php-encryption.git", - "reference": "0d4d27c368ca6798bc162469e43248c363c73495" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/0d4d27c368ca6798bc162469e43248c363c73495", - "reference": "0d4d27c368ca6798bc162469e43248c363c73495", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "paragonie/random_compat": "~2.0", - "php": ">=5.4.0" - }, - "require-dev": { - "nikic/php-parser": "^2.0|^3.0|^4.0", - "phpunit/phpunit": "^4|^5" - }, - "bin": [ - "bin/generate-defuse-key" - ], - "type": "library", - "autoload": { - "psr-4": { - "Defuse\\Crypto\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Hornby", - "email": "taylor@defuse.ca", - "homepage": "https://defuse.ca/" - }, - { - "name": "Scott Arciszewski", - "email": "info@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "Secure PHP Encryption Library", - "keywords": [ - "aes", - "authenticated encryption", - "cipher", - "crypto", - "cryptography", - "encrypt", - "encryption", - "openssl", - "security", - "symmetric key cryptography" - ], - "time": "2018-04-23T19:33:40+00:00" - }, { "name": "dnoegel/php-xdg-base-dir", "version": "0.1", @@ -1880,75 +1817,6 @@ ], "time": "2018-04-17T12:51:04+00:00" }, - { - "name": "laravel/passport", - "version": "v6.0.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/passport.git", - "reference": "86af0267016a076d58a780a86cbcdf0448ccc95e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/86af0267016a076d58a780a86cbcdf0448ccc95e", - "reference": "86af0267016a076d58a780a86cbcdf0448ccc95e", - "shasum": "" - }, - "require": { - "firebase/php-jwt": "~3.0|~4.0|~5.0", - "guzzlehttp/guzzle": "~6.0", - "illuminate/auth": "~5.6", - "illuminate/console": "~5.6", - "illuminate/container": "~5.6", - "illuminate/contracts": "~5.6", - "illuminate/database": "~5.6", - "illuminate/encryption": "~5.6", - "illuminate/http": "~5.6", - "illuminate/support": "~5.6", - "league/oauth2-server": "^7.0", - "php": ">=7.0", - "phpseclib/phpseclib": "^2.0", - "symfony/psr-http-message-bridge": "~1.0", - "zendframework/zend-diactoros": "~1.0" - }, - "require-dev": { - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Passport\\PassportServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Passport\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Laravel Passport provides OAuth2 server support to Laravel.", - "keywords": [ - "laravel", - "oauth", - "passport" - ], - "time": "2018-04-09T15:58:56+00:00" - }, { "name": "laravel/tinker", "version": "v1.0.6", @@ -2080,114 +1948,6 @@ "homepage": "https://laravelcollective.com", "time": "2018-04-09T14:09:32+00:00" }, - { - "name": "lcobucci/jwt", - "version": "3.2.2", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "0b5930be73582369e10c4d4bb7a12bac927a203c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/0b5930be73582369e10c4d4bb7a12bac927a203c", - "reference": "0b5930be73582369e10c4d4bb7a12bac927a203c", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "php": ">=5.5" - }, - "require-dev": { - "mdanter/ecc": "~0.3.1", - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "~4.5", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "time": "2017-09-01T08:23:26+00:00" - }, - { - "name": "league/event", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/event.git", - "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/event/zipball/e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", - "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "~1.0.1", - "phpspec/phpspec": "~2.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Event\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Event package", - "keywords": [ - "emitter", - "event", - "listener" - ], - "time": "2015-05-21T12:24:47+00:00" - }, { "name": "league/flysystem", "version": "1.0.44", @@ -2397,76 +2157,6 @@ ], "time": "2018-02-12T23:28:25+00:00" }, - { - "name": "league/oauth2-server", - "version": "7.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "bd47b58f81aa2bf1d2b191e4c5b61685a26bb5b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/bd47b58f81aa2bf1d2b191e4c5b61685a26bb5b7", - "reference": "bd47b58f81aa2bf1d2b191e4c5b61685a26bb5b7", - "shasum": "" - }, - "require": { - "defuse/php-encryption": "^2.1", - "ext-openssl": "*", - "lcobucci/jwt": "^3.2.2", - "league/event": "^2.1", - "php": ">=7.0.0", - "psr/http-message": "^1.0.1" - }, - "replace": { - "league/oauth2server": "*", - "lncd/oauth2": "*" - }, - "require-dev": { - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", - "phpstan/phpstan-strict-rules": "^0.9.0", - "phpunit/phpunit": "^6.3 || ^7.0", - "zendframework/zend-diactoros": "^1.3.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\OAuth2\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alex Bilbie", - "email": "hello@alexbilbie.com", - "homepage": "http://www.alexbilbie.com", - "role": "Developer" - } - ], - "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", - "homepage": "https://oauth2.thephpleague.com/", - "keywords": [ - "Authentication", - "api", - "auth", - "authorisation", - "authorization", - "oauth", - "oauth 2", - "oauth 2.0", - "oauth2", - "protect", - "resource", - "secure", - "server" - ], - "time": "2018-04-22T14:16:23+00:00" - }, { "name": "maatwebsite/excel", "version": "2.1.27", @@ -2671,6 +2361,69 @@ ], "time": "2017-06-19T01:22:40+00:00" }, + { + "name": "namshi/jose", + "version": "7.2.3", + "source": { + "type": "git", + "url": "https://github.com/namshi/jose.git", + "reference": "89a24d7eb3040e285dd5925fcad992378b82bcff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/namshi/jose/zipball/89a24d7eb3040e285dd5925fcad992378b82bcff", + "reference": "89a24d7eb3040e285dd5925fcad992378b82bcff", + "shasum": "" + }, + "require": { + "ext-date": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-spl": "*", + "php": ">=5.5", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpseclib/phpseclib": "^2.0", + "phpunit/phpunit": "^4.5|^5.0", + "satooshi/php-coveralls": "^1.0" + }, + "suggest": { + "ext-openssl": "Allows to use OpenSSL as crypto engine.", + "phpseclib/phpseclib": "Allows to use Phpseclib as crypto engine, use version ^2.0." + }, + "type": "library", + "autoload": { + "psr-4": { + "Namshi\\JOSE\\": "src/Namshi/JOSE/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Nadalin", + "email": "alessandro.nadalin@gmail.com" + }, + { + "name": "Alessandro Cinelli (cirpo)", + "email": "alessandro.cinelli@gmail.com" + } + ], + "description": "JSON Object Signing and Encryption library for PHP.", + "keywords": [ + "JSON Web Signature", + "JSON Web Token", + "JWS", + "json", + "jwt", + "token" + ], + "time": "2016-12-05T07:27:31+00:00" + }, { "name": "nesbot/carbon", "version": "1.25.0", @@ -5399,66 +5152,6 @@ "homepage": "https://symfony.com", "time": "2018-04-03T05:24:00+00:00" }, - { - "name": "symfony/psr-http-message-bridge", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "c2b757934f2d9681a287e662efbc27c41fe8ef86" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/c2b757934f2d9681a287e662efbc27c41fe8ef86", - "reference": "c2b757934f2d9681a287e662efbc27c41fe8ef86", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/http-message": "~1.0", - "symfony/http-foundation": "~2.3|~3.0|~4.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "~3.2|4.0" - }, - "suggest": { - "psr/http-message-implementation": "To use the HttpFoundation factory", - "zendframework/zend-diactoros": "To use the Zend Diactoros factory" - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\PsrHttpMessage\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "PSR HTTP message bridge", - "homepage": "http://symfony.com", - "keywords": [ - "http", - "http-message", - "psr-7" - ], - "time": "2017-12-19T00:31:44+00:00" - }, { "name": "symfony/routing", "version": "v4.0.8", @@ -5821,6 +5514,69 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "time": "2017-11-27T11:13:29+00:00" }, + { + "name": "tymon/jwt-auth", + "version": "0.5.12", + "source": { + "type": "git", + "url": "https://github.com/tymondesigns/jwt-auth.git", + "reference": "614ee3410a1cc18ef13c8d5ffd491b5608afabd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/614ee3410a1cc18ef13c8d5ffd491b5608afabd8", + "reference": "614ee3410a1cc18ef13c8d5ffd491b5608afabd8", + "shasum": "" + }, + "require": { + "illuminate/http": "~5.0", + "illuminate/support": "~5.0", + "namshi/jose": "^5.0 || ^7.0", + "nesbot/carbon": "~1.0", + "php": ">=5.4.0" + }, + "require-dev": { + "illuminate/auth": "~5.0", + "illuminate/console": "~5.0", + "illuminate/database": "~5.0", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "Tymon\\JWTAuth\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sean Tymon", + "email": "tymon148@gmail.com", + "homepage": "http://tymondesigns.com", + "role": "Developer" + } + ], + "description": "JSON Web Token Authentication for Laravel 4 and 5", + "homepage": "https://github.com/tymondesigns/jwt-auth", + "keywords": [ + "Authentication", + "JSON Web Token", + "auth", + "jwt", + "laravel", + "tymon" + ], + "time": "2017-06-07T21:32:02+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v2.4.0", @@ -6167,58 +5923,6 @@ "laravel" ], "time": "2018-04-05T14:51:57+00:00" - }, - { - "name": "zendframework/zend-diactoros", - "version": "1.7.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "bf26aff803a11c5cc8eb7c4878a702c403ec67f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/bf26aff803a11c5cc8eb7c4878a702c403ec67f1", - "reference": "bf26aff803a11c5cc8eb7c4878a702c403ec67f1", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-dom": "*", - "ext-libxml": "*", - "phpunit/phpunit": "^5.7.16 || ^6.0.8", - "zendframework/zend-coding-standard": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev", - "dev-develop": "1.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", - "keywords": [ - "http", - "psr", - "psr-7" - ], - "time": "2018-02-26T15:44:50+00:00" } ], "packages-dev": [ diff --git a/config/app.php b/config/app.php index e62b587..b431cc7 100644 --- a/config/app.php +++ b/config/app.php @@ -158,6 +158,7 @@ Spatie\Html\HtmlServiceProvider::class, Softon\SweetAlert\SweetAlertServiceProvider::class, DaveJamesMiller\Breadcrumbs\BreadcrumbsServiceProvider::class, + Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class, /* * Application Service Providers... @@ -222,5 +223,7 @@ 'Html' => Spatie\Html\Facades\Html::class, 'Link' => Spatie\Menu\Laravel\Link::class, 'Breadcrumbs' => DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::class, + 'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class, + 'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class, ], ]; diff --git a/config/auth.php b/config/auth.php index d7869b0..d7b787f 100644 --- a/config/auth.php +++ b/config/auth.php @@ -41,7 +41,7 @@ ], 'api' => [ - 'driver' => 'passport', + 'driver' => 'token', 'provider' => 'users', ], ], diff --git a/config/jwt.php b/config/jwt.php new file mode 100644 index 0000000..9804e08 --- /dev/null +++ b/config/jwt.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + /* + |-------------------------------------------------------------------------- + | JWT Authentication Secret + |-------------------------------------------------------------------------- + | + | Don't forget to set this, as it will be used to sign your tokens. + | A helper command is provided for this: `php artisan jwt:generate` + | + */ + + 'secret' => env('JWT_SECRET', 'changeme'), + + /* + |-------------------------------------------------------------------------- + | JWT time to live + |-------------------------------------------------------------------------- + | + | Specify the length of time (in minutes) that the token will be valid for. + | Defaults to 1 hour + | + */ + + 'ttl' => 60, + + /* + |-------------------------------------------------------------------------- + | Refresh time to live + |-------------------------------------------------------------------------- + | + | Specify the length of time (in minutes) that the token can be refreshed + | within. I.E. The user can refresh their token within a 2 week window of + | the original token being created until they must re-authenticate. + | Defaults to 2 weeks + | + */ + + 'refresh_ttl' => 20160, + + /* + |-------------------------------------------------------------------------- + | JWT hashing algorithm + |-------------------------------------------------------------------------- + | + | Specify the hashing algorithm that will be used to sign the token. + | + | See here: https://github.com/namshi/jose/tree/2.2.0/src/Namshi/JOSE/Signer + | for possible values + | + */ + + 'algo' => 'HS256', + + /* + |-------------------------------------------------------------------------- + | User Model namespace + |-------------------------------------------------------------------------- + | + | Specify the full namespace to your User model. + | e.g. 'Acme\Entities\User' + | + */ + + 'user' => App\Models\User::class, + + /* + |-------------------------------------------------------------------------- + | User identifier + |-------------------------------------------------------------------------- + | + | Specify a unique property of the user that will be added as the 'sub' + | claim of the token payload. + | + */ + + 'identifier' => 'id', + + /* + |-------------------------------------------------------------------------- + | Required Claims + |-------------------------------------------------------------------------- + | + | Specify the required claims that must exist in any token. + | A TokenInvalidException will be thrown if any of these claims are not + | present in the payload. + | + */ + + 'required_claims' => ['iss', 'iat', 'exp', 'nbf', 'sub', 'jti'], + + /* + |-------------------------------------------------------------------------- + | Blacklist Enabled + |-------------------------------------------------------------------------- + | + | In order to invalidate tokens, you must have the blacklist enabled. + | If you do not want or need this functionality, then set this to false. + | + */ + + 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true), + + /* + |-------------------------------------------------------------------------- + | Providers + |-------------------------------------------------------------------------- + | + | Specify the various providers used throughout the package. + | + */ + + 'providers' => [ + /* + |-------------------------------------------------------------------------- + | User Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to find the user based + | on the subject claim + | + */ + + 'user' => 'Tymon\JWTAuth\Providers\User\EloquentUserAdapter', + + /* + |-------------------------------------------------------------------------- + | JWT Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to create and decode the tokens. + | + */ + + 'jwt' => 'Tymon\JWTAuth\Providers\JWT\NamshiAdapter', + + /* + |-------------------------------------------------------------------------- + | Authentication Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to authenticate users. + | + */ + + 'auth' => 'Tymon\JWTAuth\Providers\Auth\IlluminateAuthAdapter', + + /* + |-------------------------------------------------------------------------- + | Storage Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to store tokens in the blacklist + | + */ + + 'storage' => 'Tymon\JWTAuth\Providers\Storage\IlluminateCacheAdapter', + ], +]; diff --git a/public/js/passport.js b/public/js/passport.js deleted file mode 100644 index f08f132..0000000 --- a/public/js/passport.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=53)}([,function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,l=[],u=!1,f=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):f=-1,l.length&&p())}function p(){if(!u){var t=s(d);u=!0;for(var e=l.length;e;){for(c=l,l=[];++f1)for(var n=1;n=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function C(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,$=C(function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})}),k=C(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),x=/\B([A-Z])/g,A=C(function(t){return t.replace(x,"-$1").toLowerCase()});var S=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function T(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function O(t,e){for(var n in e)t[n]=e[n];return t}function E(t){for(var e={},n=0;n0,Z=G&&G.indexOf("edge/")>0,Q=(G&&G.indexOf("android"),G&&/iphone|ipad|ipod|ios/.test(G)||"ios"===q),tt=(G&&/chrome\/\d+/.test(G),{}.watch),et=!1;if(J)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===z&&(z=!J&&!W&&void 0!==e&&"server"===e.process.env.VUE_ENV),z},it=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,st="undefined"!=typeof Symbol&&ot(Symbol)&&"undefined"!=typeof Reflect&&ot(Reflect.ownKeys);at="undefined"!=typeof Set&&ot(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ct=j,lt=0,ut=function(){this.id=lt++,this.subs=[]};ut.prototype.addSub=function(t){this.subs.push(t)},ut.prototype.removeSub=function(t){g(this.subs,t)},ut.prototype.depend=function(){ut.target&&ut.target.addDep(this)},ut.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===A(t)){var c=Bt(String,i.type);(c<0||s0&&(fe((l=t(l,(n||"")+"_"+c))[0])&&fe(f)&&(r[u]=yt(f.text+l[0].text),l.shift()),r.push.apply(r,l)):s(l)?fe(f)?r[u]=yt(f.text+l):""!==l&&r.push(yt(l)):fe(l)&&fe(f)?r[u]=yt(f.text+l.text):(a(e._isVList)&&o(l.tag)&&i(l.key)&&o(n)&&(l.key="__vlist"+n+"_"+c+"__"),r.push(l)));return r}(t):void 0}function fe(t){return o(t)&&o(t.text)&&!1===t.isComment}function de(t,e){return(t.__esModule||st&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function pe(t){return t.isComment&&t.asyncFactory}function ve(t){if(Array.isArray(t))for(var e=0;eEe&&xe[n].id>t.id;)n--;xe.splice(n+1,0,t)}else xe.push(t);Te||(Te=!0,ee(je))}}(this)},Ie.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Vt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Ie.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Ie.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Ie.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var Le={enumerable:!0,configurable:!0,get:j,set:j};function Fe(t,e,n){Le.get=function(){return this[e][n]},Le.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Le)}function Me(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];t.$parent&&$t(!1);var o=function(o){i.push(o);var a=Rt(o,e,n,t);Tt(r,o,a),o in t||Fe(t,"_props",o)};for(var a in e)o(a);$t(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?j:S(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;u(e=t._data="function"==typeof e?function(t,e){dt();try{return t.call(e,e)}catch(t){return Vt(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);for(;i--;){var o=n[i];0,r&&b(r,o)||H(o)||Fe(t,"_data",o)}St(e,!0)}(t):St(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=rt();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;0,r||(n[i]=new Ie(t,a||j,j,Pe)),i in t||De(t,i,o)}}(t,e.computed),e.watch&&e.watch!==tt&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}function pn(t){this._init(t)}function vn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name;var a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Pt(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)Fe(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)De(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,D.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=O({},a.options),i[r]=a,a}}function hn(t){return t&&(t.Ctor.options.name||t.tag)}function mn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function yn(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=hn(a.componentOptions);s&&!e(s)&&gn(n,o,r,i)}}}function gn(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,g(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=un++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r,n._parentElm=e._parentElm,n._refElm=e._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Pt(fn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&ye(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,i=n&&n.context;t.$slots=ge(e._renderChildren,i),t.$scopedSlots=r,t._c=function(e,n,r,i){return ln(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return ln(t,e,n,r,i,!0)};var o=n&&n.data;Tt(t,"$attrs",o&&o.attrs||r,null,!0),Tt(t,"$listeners",e._parentListeners||r,null,!0)}(e),ke(e,"beforeCreate"),function(t){var e=He(t.$options.inject,t);e&&($t(!1),Object.keys(e).forEach(function(n){Tt(t,n,e[n])}),$t(!0))}(e),Me(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),ke(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(pn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Ot,t.prototype.$delete=Et,t.prototype.$watch=function(t,e,n){if(u(e))return Ue(this,t,e,n);(n=n||{}).user=!0;var r=new Ie(this,t,e,n);return n.immediate&&e.call(this,r.value),function(){r.teardown()}}}(pn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){if(Array.isArray(t))for(var r=0,i=t.length;r1?T(n):n;for(var r=T(arguments,1),i=0,o=n.length;iparseInt(this.max)&&gn(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return U}};Object.defineProperty(t,"config",e),t.util={warn:ct,extend:O,mergeOptions:Pt,defineReactive:Tt},t.set=Ot,t.delete=Et,t.nextTick=ee,t.options=Object.create(null),D.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,O(t.options.components,bn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=T(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Pt(this.options,t),this}}(t),vn(t),function(t){D.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}(t)}(pn),Object.defineProperty(pn.prototype,"$isServer",{get:rt}),Object.defineProperty(pn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(pn,"FunctionalRenderContext",{value:tn}),pn.version="2.5.16";var Cn=h("style,class"),wn=h("input,textarea,option,select,progress"),$n=function(t,e,n){return"value"===n&&wn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},kn=h("contenteditable,draggable,spellcheck"),xn=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),An="http://www.w3.org/1999/xlink",Sn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Tn=function(t){return Sn(t)?t.slice(6,t.length):""},On=function(t){return null==t||!1===t};function En(t){for(var e=t.data,n=t,r=t;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=jn(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=jn(e,n.data));return function(t,e){if(o(t)||o(e))return Nn(t,In(e));return""}(e.staticClass,e.class)}function jn(t,e){return{staticClass:Nn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Nn(t,e){return t?e?t+" "+e:t:e||""}function In(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,i=t.length;r-1?ir(t,e,n):xn(e)?On(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):kn(e)?t.setAttribute(e,On(n)||"false"===n?"false":"true"):Sn(e)?On(n)?t.removeAttributeNS(An,Tn(e)):t.setAttributeNS(An,e,n):ir(t,e,n)}function ir(t,e,n){if(On(n))t.removeAttribute(e);else{if(X&&!Y&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var or={create:nr,update:nr};function ar(t,e){var n=e.elm,r=e.data,a=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=En(e),c=n._transitionClasses;o(c)&&(s=Nn(s,In(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var sr,cr,lr,ur,fr,dr,pr={create:ar,update:ar},vr=/[\w).+\-_$\]]/;function hr(t){var e,n,r,i,o,a=!1,s=!1,c=!1,l=!1,u=0,f=0,d=0,p=0;for(r=0;r=0&&" "===(h=t.charAt(v));v--);h&&vr.test(h)||(l=!0)}}else void 0===i?(p=r+1,i=t.slice(0,r).trim()):m();function m(){(o||(o=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===i?i=t.slice(0,r).trim():0!==p&&m(),o)for(r=0;r-1?{exp:t.slice(0,ur),key:'"'+t.slice(ur+1)+'"'}:{exp:t,key:null};cr=t,ur=fr=dr=0;for(;!Or();)Er(lr=Tr())?Nr(lr):91===lr&&jr(lr);return{exp:t.slice(0,fr),key:t.slice(fr+1,dr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Tr(){return cr.charCodeAt(++ur)}function Or(){return ur>=sr}function Er(t){return 34===t||39===t}function jr(t){var e=1;for(fr=ur;!Or();)if(Er(t=Tr()))Nr(t);else if(91===t&&e++,93===t&&e--,0===e){dr=ur;break}}function Nr(t){for(var e=t;!Or()&&(t=Tr())!==e;);}var Ir,Lr="__r",Fr="__c";function Mr(t,e,n,r,i){var o;e=(o=e)._withTask||(o._withTask=function(){Yt=!0;var t=o.apply(null,arguments);return Yt=!1,t}),n&&(e=function(t,e,n){var r=Ir;return function i(){null!==t.apply(null,arguments)&&Pr(e,i,n,r)}}(e,t,r)),Ir.addEventListener(t,e,et?{capture:r,passive:i}:r)}function Pr(t,e,n,r){(r||Ir).removeEventListener(t,e._withTask||e,n)}function Dr(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Ir=e.elm,function(t){if(o(t[Lr])){var e=X?"change":"input";t[e]=[].concat(t[Lr],t[e]||[]),delete t[Lr]}o(t[Fr])&&(t.change=[].concat(t[Fr],t.change||[]),delete t[Fr])}(n),se(n,r,Mr,Pr,e.context),Ir=void 0}}var Rr={create:Dr,update:Dr};function Ur(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=O({},c)),s)i(c[n])&&(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=r;var l=i(r)?"":String(r);Hr(a,l)&&(a.value=l)}else a[n]=r}}}function Hr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.lazy)return!1;if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Br={create:Ur,update:Ur},Vr=C(function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e});function zr(t){var e=Kr(t.style);return t.staticStyle?O(t.staticStyle,e):e}function Kr(t){return Array.isArray(t)?E(t):"string"==typeof t?Vr(t):t}var Jr,Wr=/^--/,qr=/\s*!important$/,Gr=function(t,e,n){if(Wr.test(e))t.style.setProperty(e,n);else if(qr.test(n))t.style.setProperty(e,n.replace(qr,""),"important");else{var r=Yr(e);if(Array.isArray(n))for(var i=0,o=n.length;i-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ei(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ni(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&O(e,ri(t.name||"v")),O(e,t),e}return"string"==typeof t?ri(t):void 0}}var ri=C(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),ii=J&&!Y,oi="transition",ai="animation",si="transition",ci="transitionend",li="animation",ui="animationend";ii&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(si="WebkitTransition",ci="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(li="WebkitAnimation",ui="webkitAnimationEnd"));var fi=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function di(t){fi(function(){fi(t)})}function pi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ti(t,e))}function vi(t,e){t._transitionClasses&&g(t._transitionClasses,e),ei(t,e)}function hi(t,e,n){var r=yi(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===oi?ci:ui,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout(function(){c0&&(n=oi,u=a,f=o.length):e===ai?l>0&&(n=ai,u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?oi:ai:null)?n===oi?o.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:n===oi&&mi.test(r[si+"Property"])}}function gi(t,e){for(;t.length1}function ki(t,e){!0!==e.data.show&&bi(e)}var xi=function(t){var e,n,r={},c=t.modules,l=t.nodeOps;for(e=0;ev?_(t,i(n[y+1])?null:n[y+1].elm,n,p,y,r):p>y&&C(0,e,d,v)}(c,p,v,n,s):o(v)?(o(t.text)&&l.setTextContent(c,""),_(c,null,v,0,v.length-1,n)):o(p)?C(0,p,0,p.length-1):o(t.text)&&l.setTextContent(c,""):t.text!==e.text&&l.setTextContent(c,e.text),o(d)&&o(u=d.hook)&&o(u=u.postpatch)&&u(t,e)}}}function x(t,e,n){if(a(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==o&&(a.selected=o);else if(L(Ei(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Oi(t,e){return e.every(function(e){return!L(e,t)})}function Ei(t){return"_value"in t?t._value:t.value}function ji(t){t.target.composing=!0}function Ni(t){t.target.composing&&(t.target.composing=!1,Ii(t.target,"input"))}function Ii(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Li(t){return!t.componentInstance||t.data&&t.data.transition?t:Li(t.componentInstance._vnode)}var Fi={model:Ai,show:{bind:function(t,e,n){var r=e.value,i=(n=Li(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,bi(n,function(){t.style.display=o})):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Li(n)).data&&n.data.transition?(n.data.show=!0,r?bi(n,function(){t.style.display=t.__vOriginalDisplay}):Ci(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},Mi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Pi(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Pi(ve(e.children)):t}function Di(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[$(o)]=i[o];return e}function Ri(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Ui={name:"transition",props:Mi,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag||pe(t)})).length){0;var r=this.mode;0;var i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var o=Pi(i);if(!o)return i;if(this._leaving)return Ri(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var c=(o.data||(o.data={})).transition=Di(this),l=this._vnode,u=Pi(l);if(o.data.directives&&o.data.directives.some(function(t){return"show"===t.name})&&(o.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,u)&&!pe(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var f=u.data.transition=O({},c);if("out-in"===r)return this._leaving=!0,ce(f,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Ri(t,i);if("in-out"===r){if(pe(o))return l;var d,p=function(){d()};ce(c,"afterEnter",p),ce(c,"enterCancelled",p),ce(f,"delayLeave",function(t){d=t})}}return i}}},Hi=O({tag:String,moveClass:String},Mi);function Bi(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Vi(t){t.data.newPos=t.elm.getBoundingClientRect()}function zi(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete Hi.mode;var Ki={Transition:Ui,TransitionGroup:{props:Hi,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Di(this),s=0;s-1?Rn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Rn[t]=/HTMLUnknownElement/.test(e.toString())},O(pn.options.directives,Fi),O(pn.options.components,Ki),pn.prototype.__patch__=J?xi:j,pn.prototype.$mount=function(t,e){return function(t,e,n){return t.$el=e,t.$options.render||(t.$options.render=mt),ke(t,"beforeMount"),new Ie(t,function(){t._update(t._render(),n)},j,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,ke(t,"mounted")),t}(this,t=t&&J?Hn(t):void 0,e)},J&&setTimeout(function(){U.devtools&&it&&it.emit("init",pn)},0);var Ji=/\{\{((?:.|\n)+?)\}\}/g,Wi=/[-.*+?^${}()|[\]\/\\]/g,qi=C(function(t){var e=t[0].replace(Wi,"\\$&"),n=t[1].replace(Wi,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")});function Gi(t,e){var n=e?qi(e):Ji;if(n.test(t)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(i=r.index)>c&&(s.push(o=t.slice(c,i)),a.push(JSON.stringify(o)));var l=hr(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=i+r[0].length}return c\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,io="[a-zA-Z_][\\w\\-\\.]*",oo="((?:"+io+"\\:)?"+io+")",ao=new RegExp("^<"+oo),so=/^\s*(\/?)>/,co=new RegExp("^<\\/"+oo+"[^>]*>"),lo=/^]+>/i,uo=/^",""":'"',"&":"&"," ":"\n"," ":"\t"},yo=/&(?:lt|gt|quot|amp);/g,go=/&(?:lt|gt|quot|amp|#10|#9);/g,_o=h("pre,textarea",!0),bo=function(t,e){return t&&_o(t)&&"\n"===e[0]};function Co(t,e){var n=e?go:yo;return t.replace(n,function(t){return mo[t]})}var wo,$o,ko,xo,Ao,So,To,Oo,Eo=/^@|^v-on:/,jo=/^v-|^@|^:/,No=/([^]*?)\s+(?:in|of)\s+([^]*)/,Io=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Lo=/^\(|\)$/g,Fo=/:(.*)$/,Mo=/^:|^v-bind:/,Po=/\.[^.]+/g,Do=C(Qi);function Ro(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},n=0,r=t.length;n]*>)","i")),d=t.replace(f,function(t,n,r){return l=r.length,vo(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),bo(u,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});c+=t.length-d.length,t=d,A(u,c-l,c)}else{var p=t.indexOf("<");if(0===p){if(uo.test(t)){var v=t.indexOf("--\x3e");if(v>=0){e.shouldKeepComment&&e.comment(t.substring(4,v)),$(v+3);continue}}if(fo.test(t)){var h=t.indexOf("]>");if(h>=0){$(h+2);continue}}var m=t.match(lo);if(m){$(m[0].length);continue}var y=t.match(co);if(y){var g=c;$(y[0].length),A(y[1],g,c);continue}var _=k();if(_){x(_),bo(r,t)&&$(1);continue}}var b=void 0,C=void 0,w=void 0;if(p>=0){for(C=t.slice(p);!(co.test(C)||ao.test(C)||uo.test(C)||fo.test(C)||(w=C.indexOf("<",1))<0);)p+=w,C=t.slice(p);b=t.substring(0,p),$(p)}p<0&&(b=t,t=""),e.chars&&b&&e.chars(b)}if(t===n){e.chars&&e.chars(t);break}}function $(e){c+=e,t=t.substring(e)}function k(){var e=t.match(ao);if(e){var n,r,i={tagName:e[1],attrs:[],start:c};for($(e[0].length);!(n=t.match(so))&&(r=t.match(ro));)$(r[0].length),i.attrs.push(r);if(n)return i.unarySlash=n[1],$(n[0].length),i.end=c,i}}function x(t){var n=t.tagName,c=t.unarySlash;o&&("p"===r&&no(n)&&A(r),s(n)&&r===n&&A(n));for(var l=a(n)||!!c,u=t.attrs.length,f=new Array(u),d=0;d=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=i.length-1;l>=a;l--)e.end&&e.end(i[l].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,o):"p"===s&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}A()}(t,{warn:wo,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,o,l){var u=r&&r.ns||Oo(t);X&&"svg"===u&&(o=function(t){for(var e=[],n=0;n-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),$r(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Sr(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Sr(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Sr(e,"$$c")+"}",null,!0)}(t,r,i);else if("input"===o&&"radio"===a)!function(t,e,n){var r=n&&n.number,i=kr(t,"value")||"null";_r(t,"checked","_q("+e+","+(i=r?"_n("+i+")":i)+")"),$r(t,"change",Sr(e,i),null,!0)}(t,r,i);else if("input"===o||"textarea"===o)!function(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,l=o?"change":"range"===r?Lr:"input",u="$event.target.value";s&&(u="$event.target.value.trim()"),a&&(u="_n("+u+")");var f=Sr(e,u);c&&(f="if($event.target.composing)return;"+f),_r(t,"value","("+e+")"),$r(t,l,f,null,!0),(s||a)&&$r(t,"blur","$forceUpdate()")}(t,r,i);else if(!U.isReservedTag(o))return Ar(t,r,i),!1;return!0},text:function(t,e){e.value&&_r(t,"textContent","_s("+e.value+")")},html:function(t,e){e.value&&_r(t,"innerHTML","_s("+e.value+")")}},isPreTag:function(t){return"pre"===t},isUnaryTag:to,mustUseProp:$n,canBeLeftOpenTag:eo,isReservedTag:Pn,getTagNamespace:Dn,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(qo)},Zo=C(function(t){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))});function Qo(t,e){t&&(Go=Zo(e.staticKeys||""),Xo=e.isReservedTag||N,function t(e){e.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!Xo(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Go)))}(e);if(1===e.type){if(!Xo(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var n=0,r=e.children.length;n|^function\s*\(/,ea=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,na={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ra={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},ia=function(t){return"if("+t+")return null;"},oa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ia("$event.target !== $event.currentTarget"),ctrl:ia("!$event.ctrlKey"),shift:ia("!$event.shiftKey"),alt:ia("!$event.altKey"),meta:ia("!$event.metaKey"),left:ia("'button' in $event && $event.button !== 0"),middle:ia("'button' in $event && $event.button !== 1"),right:ia("'button' in $event && $event.button !== 2")};function aa(t,e,n){var r=e?"nativeOn:{":"on:{";for(var i in t)r+='"'+i+'":'+sa(i,t[i])+",";return r.slice(0,-1)+"}"}function sa(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return sa(t,e)}).join(",")+"]";var n=ea.test(e.value),r=ta.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(oa[s])o+=oa[s],na[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=ia(["ctrl","shift","alt","meta"].filter(function(t){return!c[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(t){return"if(!('button' in $event)&&"+t.map(ca).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function ca(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=na[t],r=ra[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var la={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:j},ua=function(t){this.options=t,this.warn=t.warn||yr,this.transforms=gr(t.modules,"transformCode"),this.dataGenFns=gr(t.modules,"genData"),this.directives=O(O({},la),t.directives);var e=t.isReservedTag||N;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]};function fa(t,e){var n=new ua(e);return{render:"with(this){return "+(t?da(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function da(t,e){if(t.staticRoot&&!t.staticProcessed)return pa(t,e);if(t.once&&!t.onceProcessed)return va(t,e);if(t.for&&!t.forProcessed)return function(t,e,n,r){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";0;return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||da)(t,e)+"})"}(t,e);if(t.if&&!t.ifProcessed)return ha(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=ga(t,e),i="_t("+n+(r?","+r:""),o=t.attrs&&"{"+t.attrs.map(function(t){return $(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:ga(e,n,!0);return"_c("+t+","+ma(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r=t.plain?void 0:ma(t,e),i=t.inlineTemplate?null:ga(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o':'
',xa.innerHTML.indexOf(" ")>0}var Ta=!!J&&Sa(!1),Oa=!!J&&Sa(!0),Ea=C(function(t){var e=Hn(t);return e&&e.innerHTML}),ja=pn.prototype.$mount;pn.prototype.$mount=function(t,e){if((t=t&&Hn(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Ea(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){0;var i=Aa(r,{shouldDecodeNewlines:Ta,shouldDecodeNewlinesForHref:Oa,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return ja.call(this,t,e)},pn.compile=Aa,t.exports=pn}).call(e,n(1),n(6).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(7),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(1))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,c=1,l={},u=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){v(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){v(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){v(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(v,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&v(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;nn.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i0?n("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),n("tbody",t._l(t.clients,function(e){return n("tr",[n("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.id)+"\n ")]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("code",[t._v(t._s(e.secret))])]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("a",{staticClass:"action-link",attrs:{tabindex:"-1"},on:{click:function(n){t.edit(e)}}},[t._v("\n Edit\n ")])]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("a",{staticClass:"action-link text-danger",on:{click:function(n){t.destroy(e)}}},[t._v("\n Delete\n ")])])])}))]):t._e()])]),t._v(" "),n("div",{staticClass:"modal fade",attrs:{id:"modal-create-client",tabindex:"-1",role:"dialog"}},[n("div",{staticClass:"modal-dialog"},[n("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),n("div",{staticClass:"modal-body"},[t.createForm.errors.length>0?n("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),n("br"),t._v(" "),n("ul",t._l(t.createForm.errors,function(e){return n("li",[t._v("\n "+t._s(e)+"\n ")])}))]):t._e(),t._v(" "),n("form",{attrs:{role:"form"}},[n("div",{staticClass:"form-group row"},[n("label",{staticClass:"col-md-3 col-form-label"},[t._v("Name")]),t._v(" "),n("div",{staticClass:"col-md-9"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.name,expression:"createForm.name"}],staticClass:"form-control",attrs:{id:"create-client-name",type:"text"},domProps:{value:t.createForm.name},on:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.store(e):null},input:function(e){e.target.composing||t.$set(t.createForm,"name",e.target.value)}}}),t._v(" "),n("span",{staticClass:"form-text text-muted"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),n("div",{staticClass:"form-group row"},[n("label",{staticClass:"col-md-3 col-form-label"},[t._v("Redirect URL")]),t._v(" "),n("div",{staticClass:"col-md-9"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.createForm.redirect,expression:"createForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.createForm.redirect},on:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.store(e):null},input:function(e){e.target.composing||t.$set(t.createForm,"redirect",e.target.value)}}}),t._v(" "),n("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's authorization callback URL.\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal-footer"},[n("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal fade",attrs:{id:"modal-edit-client",tabindex:"-1",role:"dialog"}},[n("div",{staticClass:"modal-dialog"},[n("div",{staticClass:"modal-content"},[t._m(3),t._v(" "),n("div",{staticClass:"modal-body"},[t.editForm.errors.length>0?n("div",{staticClass:"alert alert-danger"},[t._m(4),t._v(" "),n("br"),t._v(" "),n("ul",t._l(t.editForm.errors,function(e){return n("li",[t._v("\n "+t._s(e)+"\n ")])}))]):t._e(),t._v(" "),n("form",{attrs:{role:"form"}},[n("div",{staticClass:"form-group row"},[n("label",{staticClass:"col-md-3 col-form-label"},[t._v("Name")]),t._v(" "),n("div",{staticClass:"col-md-9"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.name,expression:"editForm.name"}],staticClass:"form-control",attrs:{id:"edit-client-name",type:"text"},domProps:{value:t.editForm.name},on:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.update(e):null},input:function(e){e.target.composing||t.$set(t.editForm,"name",e.target.value)}}}),t._v(" "),n("span",{staticClass:"form-text text-muted"},[t._v("\n Something your users will recognize and trust.\n ")])])]),t._v(" "),n("div",{staticClass:"form-group row"},[n("label",{staticClass:"col-md-3 col-form-label"},[t._v("Redirect URL")]),t._v(" "),n("div",{staticClass:"col-md-9"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.editForm.redirect,expression:"editForm.redirect"}],staticClass:"form-control",attrs:{type:"text",name:"redirect"},domProps:{value:t.editForm.redirect},on:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.update(e):null},input:function(e){e.target.composing||t.$set(t.editForm,"redirect",e.target.value)}}}),t._v(" "),n("span",{staticClass:"form-text text-muted"},[t._v("\n Your application's authorization callback URL.\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal-footer"},[n("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.update}},[t._v("\n Save Changes\n ")])])])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("thead",[e("tr",[e("th",[this._v("Client ID")]),this._v(" "),e("th",[this._v("Name")]),this._v(" "),e("th",[this._v("Secret")]),this._v(" "),e("th"),this._v(" "),e("th")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[this._v("\n Create Client\n ")]),this._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[this._v("×")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("strong",[this._v("Whoops!")]),this._v(" Something went wrong!")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[this._v("\n Edit Client\n ")]),this._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[this._v("×")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("strong",[this._v("Whoops!")]),this._v(" Something went wrong!")])}]}},function(t,e,n){var r=n(9)(n(64),n(65),!1,function(t){n(62)},"data-v-04b7805e",null);t.exports=r.exports},function(t,e,n){var r=n(63);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(8)("426680a8",r,!0,{})},function(t,e,n){(t.exports=n(4)(!1)).push([t.i,".action-link[data-v-04b7805e]{cursor:pointer}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{tokens:[]}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens()},getTokens:function(){var t=this;axios.get("/oauth/tokens").then(function(e){t.tokens=e.data})},revoke:function(t){var e=this;axios.delete("/oauth/tokens/"+t.id).then(function(t){e.getTokens()})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.tokens.length>0?n("div",[n("div",{staticClass:"card card-default"},[n("div",{staticClass:"card-header"},[t._v("Authorized Applications")]),t._v(" "),n("div",{staticClass:"card-body"},[n("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),n("tbody",t._l(t.tokens,function(e){return n("tr",[n("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.client.name)+"\n ")]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[e.scopes.length>0?n("span",[t._v("\n "+t._s(e.scopes.join(", "))+"\n ")]):t._e()]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("a",{staticClass:"action-link text-danger",on:{click:function(n){t.revoke(e)}}},[t._v("\n Revoke\n ")])])])}))])])])]):t._e()])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("thead",[e("tr",[e("th",[this._v("Name")]),this._v(" "),e("th",[this._v("Scopes")]),this._v(" "),e("th")])])}]}},function(t,e,n){var r=n(9)(n(69),n(70),!1,function(t){n(67)},"data-v-3aa17905",null);t.exports=r.exports},function(t,e,n){var r=n(68);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(8)("223d89ee",r,!0,{})},function(t,e,n){(t.exports=n(4)(!1)).push([t.i,".action-link[data-v-3aa17905]{cursor:pointer}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default={data:function(){return{accessToken:null,tokens:[],scopes:[],form:{name:"",scopes:[],errors:[]}}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens(),this.getScopes(),$("#modal-create-token").on("shown.bs.modal",function(){$("#create-token-name").focus()})},getTokens:function(){var t=this;axios.get("/oauth/personal-access-tokens").then(function(e){t.tokens=e.data})},getScopes:function(){var t=this;axios.get("/oauth/scopes").then(function(e){t.scopes=e.data})},showCreateTokenForm:function(){$("#modal-create-token").modal("show")},store:function(){var t=this;this.accessToken=null,this.form.errors=[],axios.post("/oauth/personal-access-tokens",this.form).then(function(e){t.form.name="",t.form.scopes=[],t.form.errors=[],t.tokens.push(e.data.token),t.showAccessToken(e.data.accessToken)}).catch(function(e){"object"===r(e.response.data)?t.form.errors=_.flatten(_.toArray(e.response.data.errors)):t.form.errors=["Something went wrong. Please try again."]})},toggleScope:function(t){this.scopeIsAssigned(t)?this.form.scopes=_.reject(this.form.scopes,function(e){return e==t}):this.form.scopes.push(t)},scopeIsAssigned:function(t){return _.indexOf(this.form.scopes,t)>=0},showAccessToken:function(t){$("#modal-create-token").modal("hide"),this.accessToken=t,$("#modal-access-token").modal("show")},revoke:function(t){var e=this;axios.delete("/oauth/personal-access-tokens/"+t.id).then(function(t){e.getTokens()})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",[n("div",{staticClass:"card card-default"},[n("div",{staticClass:"card-header"},[n("div",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"}},[n("span",[t._v("\n Personal Access Tokens\n ")]),t._v(" "),n("a",{staticClass:"action-link",attrs:{tabindex:"-1"},on:{click:t.showCreateTokenForm}},[t._v("\n Create New Token\n ")])])]),t._v(" "),n("div",{staticClass:"card-body"},[0===t.tokens.length?n("p",{staticClass:"mb-0"},[t._v("\n You have not created any personal access tokens.\n ")]):t._e(),t._v(" "),t.tokens.length>0?n("table",{staticClass:"table table-borderless mb-0"},[t._m(0),t._v(" "),n("tbody",t._l(t.tokens,function(e){return n("tr",[n("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("td",{staticStyle:{"vertical-align":"middle"}},[n("a",{staticClass:"action-link text-danger",on:{click:function(n){t.revoke(e)}}},[t._v("\n Delete\n ")])])])}))]):t._e()])])]),t._v(" "),n("div",{staticClass:"modal fade",attrs:{id:"modal-create-token",tabindex:"-1",role:"dialog"}},[n("div",{staticClass:"modal-dialog"},[n("div",{staticClass:"modal-content"},[t._m(1),t._v(" "),n("div",{staticClass:"modal-body"},[t.form.errors.length>0?n("div",{staticClass:"alert alert-danger"},[t._m(2),t._v(" "),n("br"),t._v(" "),n("ul",t._l(t.form.errors,function(e){return n("li",[t._v("\n "+t._s(e)+"\n ")])}))]):t._e(),t._v(" "),n("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.store(e)}}},[n("div",{staticClass:"form-group row"},[n("label",{staticClass:"col-md-4 col-form-label"},[t._v("Name")]),t._v(" "),n("div",{staticClass:"col-md-6"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.form.name,expression:"form.name"}],staticClass:"form-control",attrs:{id:"create-token-name",type:"text",name:"name"},domProps:{value:t.form.name},on:{input:function(e){e.target.composing||t.$set(t.form,"name",e.target.value)}}})])]),t._v(" "),t.scopes.length>0?n("div",{staticClass:"form-group row"},[n("label",{staticClass:"col-md-4 col-form-label"},[t._v("Scopes")]),t._v(" "),n("div",{staticClass:"col-md-6"},t._l(t.scopes,function(e){return n("div",[n("div",{staticClass:"checkbox"},[n("label",[n("input",{attrs:{type:"checkbox"},domProps:{checked:t.scopeIsAssigned(e.id)},on:{click:function(n){t.toggleScope(e.id)}}}),t._v("\n\n "+t._s(e.id)+"\n ")])])])}))]):t._e()])]),t._v(" "),n("div",{staticClass:"modal-footer"},[n("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[t._v("Close")]),t._v(" "),n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.store}},[t._v("\n Create\n ")])])])])]),t._v(" "),n("div",{staticClass:"modal fade",attrs:{id:"modal-access-token",tabindex:"-1",role:"dialog"}},[n("div",{staticClass:"modal-dialog"},[n("div",{staticClass:"modal-content"},[t._m(3),t._v(" "),n("div",{staticClass:"modal-body"},[n("p",[t._v("\n Here is your new personal access token. This is the only time it will be shown so don't lose it!\n You may now use this token to make API requests.\n ")]),t._v(" "),n("textarea",{staticClass:"form-control",attrs:{rows:"10"}},[t._v(t._s(t.accessToken))])]),t._v(" "),t._m(4)])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("thead",[e("tr",[e("th",[this._v("Name")]),this._v(" "),e("th")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[this._v("\n Create Token\n ")]),this._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[this._v("×")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("strong",[this._v("Whoops!")]),this._v(" Something went wrong!")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"modal-header"},[e("h4",{staticClass:"modal-title"},[this._v("\n Personal Access Token\n ")]),this._v(" "),e("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-hidden":"true"}},[this._v("×")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"modal-footer"},[e("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"}},[this._v("Close")])])}]}}]); \ No newline at end of file diff --git a/resources/assets/js/passport.js b/resources/assets/js/passport.js deleted file mode 100644 index 8ed043e..0000000 --- a/resources/assets/js/passport.js +++ /dev/null @@ -1,20 +0,0 @@ -window.Vue = require('vue'); - -Vue.component( - 'passport-clients', - require('./components/passport/Clients.vue') -); - -Vue.component( - 'passport-authorized-clients', - require('./components/passport/AuthorizedClients.vue') -); - -Vue.component( - 'passport-personal-access-tokens', - require('./components/passport/PersonalAccessTokens.vue') -); - -const app = new Vue({ - el: '#passport' -}); \ No newline at end of file diff --git a/resources/views/components/navigations/navbar.blade.php b/resources/views/components/navigations/navbar.blade.php index 69eb8f0..4e9e51c 100644 --- a/resources/views/components/navigations/navbar.blade.php +++ b/resources/views/components/navigations/navbar.blade.php @@ -35,22 +35,6 @@
  • {{ __('Login') }}
  • {{ __('Register') }}
  • @else - @can('passport_show') - - @endcan - @can('setting_show')