diff options
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r-- | src/org/traccar/web/BaseServlet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/web/BaseServlet.java b/src/org/traccar/web/BaseServlet.java index a77ad0908..039e3a1f4 100644 --- a/src/org/traccar/web/BaseServlet.java +++ b/src/org/traccar/web/BaseServlet.java @@ -65,7 +65,9 @@ public abstract class BaseServlet extends HttpServlet { String authorization = req.getHeader(Authorization.HEADER); if (authorization != null && !authorization.isEmpty()) { Map<String, String> authMap = Authorization.parse(authorization); - User user = Context.getDataManager().login(authMap.get(Authorization.USERNAME), authMap.get(Authorization.PASSWORD)); + String username = authMap.get(Authorization.USERNAME); + String password = authMap.get(Authorization.PASSWORD); + User user = Context.getDataManager().login(username, password); if (user != null) { return user.getId(); } |