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
oncampus
Patterns and Frameworks
Commits
e771607f
Commit
e771607f
authored
Dec 04, 2019
by
Jens Ehlers
Browse files
minor fix in REST API
parent
bab90557
Pipeline
#9927
passed with stage
in 1 minute and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
remote/rest-server/src/main/java/filter/AuthenticationFilter.java
View file @
e771607f
...
...
@@ -38,6 +38,7 @@ public class AuthenticationFilter implements ContainerRequestFilter {
String
authHeader
=
request
.
getHeaders
().
getFirst
(
HttpHeaders
.
AUTHORIZATION
);
if
(
authHeader
==
null
||
!
authHeader
.
startsWith
(
TOKEN_TYPE
+
" "
))
{
request
.
abortWith
(
Response
.
status
(
401
).
entity
(
"JWT not found in HTTP header"
).
build
());
return
;
}
// extract the token from the HTTP authorization header
String
jwt
=
authHeader
.
substring
(
TOKEN_TYPE
.
length
()).
trim
();
...
...
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