|
@@ -186,11 +186,12 @@ public class MultiSchemeAuthenticationHandler implements
|
|
|
String authorization =
|
|
|
request.getHeader(HttpConstants.AUTHORIZATION_HEADER);
|
|
|
if (authorization != null) {
|
|
|
- for (String scheme : schemeToAuthHandlerMapping.keySet()) {
|
|
|
- if (AuthenticationHandlerUtil.matchAuthScheme(scheme, authorization)) {
|
|
|
- AuthenticationHandler handler =
|
|
|
- schemeToAuthHandlerMapping.get(scheme);
|
|
|
- AuthenticationToken token = handler.authenticate(request, response);
|
|
|
+ for (Map.Entry<String, AuthenticationHandler> entry :
|
|
|
+ schemeToAuthHandlerMapping.entrySet()) {
|
|
|
+ if (AuthenticationHandlerUtil.matchAuthScheme(
|
|
|
+ entry.getKey(), authorization)) {
|
|
|
+ AuthenticationToken token =
|
|
|
+ entry.getValue().authenticate(request, response);
|
|
|
logger.trace("Token generated with type {}", token.getType());
|
|
|
return token;
|
|
|
}
|