Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LabNbook
LabNbook-code
Commits
8311bdb5
Verified
Commit
8311bdb5
authored
Mar 17, 2021
by
David Beniamine
Browse files
Log JWT errors
parent
06d5f06d
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Middleware/JWTServer.php
View file @
8311bdb5
...
...
@@ -205,8 +205,10 @@ class JWTServer
self
::
authenticate
(
$request
,
$user
);
}
}
catch
(
JWTException
$e
)
{
Log
::
Warning
(
'JWT Exception while authenticating via API: "'
.
$e
->
getMessage
()
.
'"'
);
return
$this
->
fail
(
401
,
$e
->
getMessage
());
}
catch
(
\
InvalidArgumentException
$e
)
{
Log
::
Error
(
'Error validating token while authenticating via API: "'
.
$e
->
getMessage
()
.
'"'
);
return
$this
->
fail
(
401
,
'Missing or corrupted token'
);
}
...
...
Write
Preview
Supports
Markdown
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