diff options
author | Vitaly Takmazov | 2019-03-01 16:40:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-03-01 16:40:49 +0300 |
commit | c693f54a6118784c05a44993de9eed5af050b55e (patch) | |
tree | e5bdd6951e2af5ee75e67d2c991458890d5dd146 | |
parent | b02d6b11957b32afe2ef569c095add695a7ecf28 (diff) |
Fix external auth
-rw-r--r-- | src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java index 22dc3b9c..44d97207 100644 --- a/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java +++ b/src/main/java/com/juick/service/security/HTTPSignatureAuthenticationFilter.java @@ -43,8 +43,8 @@ public class HTTPSignatureAuthenticationFilter extends OncePerRequestFilter { .collect(Collectors.toMap(String::toLowerCase, request::getHeader)); if (StringUtils.isNotEmpty(headers.get("signature"))) { User user = signatureManager.verifySignature(request.getMethod(), request.getRequestURI(), headers); - if (!user.isAnonymous()) { - String userUri = user.getUri().toString(); + String userUri = user.getUri().toString(); + if (!user.isAnonymous() || userUri.length() > 0) { if (userUri.length() == 0) { User userWithPassword = userService.getUserByName(user.getName()); userWithPassword.setAuthHash(userService.getHashByUID(userWithPassword.getUid())); |