Compilation: Fix compilation issue with latest 1.4-SNAPSHOT
Original commit: elastic/x-pack-elasticsearch@66624a104f
This commit is contained in:
parent
44a549fd12
commit
f4824d78e4
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue