Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
40643c43
Unverified
Commit
40643c43
authored
Mar 11, 2018
by
Viral Solani
Committed by
GitHub
Mar 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #160 from viralsolani/analysis-qoOmbg
Apply fixes from StyleCI
parents
341ff697
a9a8b217
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
AuthController.php
app/Http/Controllers/Api/V1/AuthController.php
+7
-10
No files found.
app/Http/Controllers/Api/V1/AuthController.php
View file @
40643c43
...
...
@@ -2,13 +2,12 @@
namespace
App\Http\Controllers\Api\V1
;
use
JWTAuth
;
use
Illuminate\Support\Facades\Hash
;
use
Validator
;
use
Illuminate\Http\Request
;
use
App\Models\Access\User\User
;
use
App\Http\Resources\UserResource
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Hash
;
use
JWTAuth
;
use
Tymon\JWTAuth\Exceptions\JWTException
;
use
Validator
;
class
AuthController
extends
APIController
{
...
...
@@ -19,7 +18,6 @@ class AuthController extends APIController
*
* @return \Illuminate\Http\JsonResponse
*/
public
function
login
(
Request
$request
)
{
$validation
=
Validator
::
make
(
$request
->
all
(),
[
...
...
@@ -40,7 +38,7 @@ class AuthController extends APIController
}
try
{
$customClaims
=
[
$customClaims
=
[
'id'
=>
$user
->
id
,
'first_name'
=>
$user
->
first_name
,
'last_name'
=>
$user
->
last_name
,
...
...
@@ -50,9 +48,9 @@ class AuthController extends APIController
'last_updated_at'
=>
$user
->
updated_at
->
toIso8601String
(),
];
$token
=
JWTAuth
::
fromUser
(
$user
,
$customClaims
);
$token
=
JWTAuth
::
fromUser
(
$user
,
$customClaims
);
}
catch
(
JWTException
$e
)
{
return
$this
->
respondInternalError
(
$e
->
getMessage
());
return
$this
->
respondInternalError
(
$e
->
getMessage
());
}
return
$this
->
respond
([
...
...
@@ -61,7 +59,6 @@ class AuthController extends APIController
]);
}
/*public function login(Request $request)
{
$validation = Validator::make($request->all(), [
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment