Compilation: Fix compilation issue with latest 1.4-SNAPSHOT

Original commit: elastic/x-pack-elasticsearch@66624a104f
This commit is contained in:
Alexander Reelsen 2014-08-08 08:58:12 +02:00
parent 44a549fd12
commit f4824d78e4
1 changed files with 2 additions and 2 deletions

View File

@ -42,12 +42,12 @@ public class UsernamePasswordToken implements AuthenticationToken {
} }
public static UsernamePasswordToken extractToken(TransportRequest request, UsernamePasswordToken defaultToken) { public static UsernamePasswordToken extractToken(TransportRequest request, UsernamePasswordToken defaultToken) {
UsernamePasswordToken token = (UsernamePasswordToken) request.getHeaders().get(TOKEN_HEADER); UsernamePasswordToken token = (UsernamePasswordToken) request.getHeader(TOKEN_HEADER);
if (token != null) { if (token != null) {
return token; return token;
} }
String authStr = (String) request.getHeaders().get(BASIC_AUTH_HEADER); String authStr = (String) request.getHeader(BASIC_AUTH_HEADER);
if (authStr == null) { if (authStr == null) {
if (defaultToken == null) { if (defaultToken == null) {
return null; return null;