Skip to content

Commit 0f28ac0

Browse files
committed
fix tests
1 parent 7c3c8a3 commit 0f28ac0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ public AuthenticationService(
112112

113113
final String nodeName = Node.NODE_NAME_SETTING.get(settings);
114114
CustomTokenAuthenticator oauth2Authenticator = customTokenAuthenticators.stream()
115-
.filter(t -> t.name().contains("oauth2") || t instanceof CustomTokenAuthenticator.Noop)
115+
.filter(t -> t.name().contains("oauth2"))
116116
.findAny()
117-
.orElseThrow();
117+
.orElse(new CustomTokenAuthenticator.Noop());
118118
CustomTokenAuthenticator apiKeyAuthenticator = customTokenAuthenticators.stream()
119-
.filter(t -> t.name().contains("api key") || t instanceof CustomTokenAuthenticator.Noop)
119+
.filter(t -> t.name().contains("api key"))
120120
.findAny()
121-
.orElseThrow();
121+
.orElse(new CustomTokenAuthenticator.Noop());
122122
this.authenticatorChain = new AuthenticatorChain(
123123
settings,
124124
operatorPrivilegesService,

0 commit comments

Comments
 (0)