This is an automated email from the ASF dual-hosted git repository.
jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/master by this push:
new a884a7e Fix the MP JWT FIlter
a884a7e is described below
commit a884a7e6b2b94e01096098e420823629a8c47392
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Mon Aug 5 15:16:31 2019 +0200
Fix the MP JWT FIlter
---
mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
b/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
index 85cdbb9..e4a6774 100644
--- a/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
+++ b/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
@@ -293,7 +293,7 @@ public class MPJWTFilter implements Filter {
throw new MissingAuthorizationHeaderException();
}
- final String headerScheme = jwtAuthConfiguration.getHeaderScheme()
+ " ";
+ final String headerScheme =
(jwtAuthConfiguration.getHeaderScheme() + " ").toLowerCase(Locale.ENGLISH);
if (headerScheme.trim().length() > 0 &&
!authorizationHeader.toLowerCase(Locale.ENGLISH).startsWith(headerScheme)) {
throw new BadAuthorizationPrefixException(authorizationHeader);
}