|
@@ -22,6 +22,7 @@ import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.server.reactive.ServerHttpRequest;
|
|
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
|
import org.springframework.security.core.Authentication;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.server.ServerWebExchange;
|
|
|
|
|
|
import reactor.core.publisher.Mono;
|
|
@@ -46,7 +47,7 @@ public class ServerHttpBasicAuthenticationConverter implements
|
|
|
ServerHttpRequest request = exchange.getRequest();
|
|
|
|
|
|
String authorization = request.getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
|
|
|
- if (authorization == null || !authorization.toLowerCase().startsWith("basic ")) {
|
|
|
+ if (!StringUtils.startsWithIgnoreCase(authorization, "basic ")) {
|
|
|
return Mono.empty();
|
|
|
}
|
|
|
|