for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bludata\Lumen\Authentication\JWT\Providers;
use Exception;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\ServiceProvider;
class JWTServiceProvider extends ServiceProvider
{
public function register()
$this->app->bind('Bludata\Lumen\Authentication\JWT\Interfaces\JWTInterface', 'Bludata\Lumen\Authentication\JWT\Libs\JWT');
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.
$this->app['auth']->viaRequest(
'api', function ($request) {
if ($token = $request->header('authorization')) {
$auth = app('Bludata\Lumen\Authentication\JWT\Interfaces\AuthRepositoryInterface');
try {
$user = $auth->getUserLoggedByToken($token);
} catch (Exception $e) {
abort(401, $e->getMessage());
}
return $user;
);
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.