Skip to content

Commit

Permalink
zalando#951 use noAuthentication in ClientResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
fbrns committed Mar 22, 2019
1 parent 36452b9 commit 1072241
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import java.util.Map;
import java.util.Optional;

import static org.zalando.nakadi.config.SecuritySettings.AuthMode.OFF;

@Component
public class ClientResolver implements HandlerMethodArgumentResolver {

Expand Down Expand Up @@ -49,7 +47,7 @@ public Client resolveArgument(final MethodParameter parameter,
final String clientId = authorizationService.getSubject().map(Subject::getName)
.orElse(SecuritySettings.UNAUTHENTICATED_CLIENT_ID);

if(settings.getAuthMode() == OFF) {
if(settings.getAuthMode().isNoAuthentication()) {
return new FullAccessClient(clientId);
} else {
if (clientId.equals(settings.getAdminClientId())) {
Expand Down

0 comments on commit 1072241

Please sign in to comment.