[Cleanup] - removed redundant overridden methods in esusers realm
Original commit: elastic/x-pack-elasticsearch@98ef6a9953
This commit is contained in:
parent
2f373f692f
commit
1d040c4c23
|
@ -10,14 +10,11 @@ import org.elasticsearch.common.settings.ImmutableSettings;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.env.Environment;
|
import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.rest.RestController;
|
import org.elasticsearch.rest.RestController;
|
||||||
import org.elasticsearch.rest.RestRequest;
|
|
||||||
import org.elasticsearch.shield.User;
|
import org.elasticsearch.shield.User;
|
||||||
import org.elasticsearch.shield.authc.AuthenticationToken;
|
|
||||||
import org.elasticsearch.shield.authc.Realm;
|
import org.elasticsearch.shield.authc.Realm;
|
||||||
import org.elasticsearch.shield.authc.support.CachingUsernamePasswordRealm;
|
import org.elasticsearch.shield.authc.support.CachingUsernamePasswordRealm;
|
||||||
import org.elasticsearch.shield.authc.support.RefreshListener;
|
import org.elasticsearch.shield.authc.support.RefreshListener;
|
||||||
import org.elasticsearch.shield.authc.support.UsernamePasswordToken;
|
import org.elasticsearch.shield.authc.support.UsernamePasswordToken;
|
||||||
import org.elasticsearch.transport.TransportMessage;
|
|
||||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,26 +36,6 @@ public class ESUsersRealm extends CachingUsernamePasswordRealm {
|
||||||
userRolesStore.addListener(listener);
|
userRolesStore.addListener(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String type() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public UsernamePasswordToken token(RestRequest request) {
|
|
||||||
return UsernamePasswordToken.extractToken(request, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public UsernamePasswordToken token(TransportMessage<?> message) {
|
|
||||||
return UsernamePasswordToken.extractToken(message, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supports(AuthenticationToken token) {
|
|
||||||
return token instanceof UsernamePasswordToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected User doAuthenticate(UsernamePasswordToken token) {
|
protected User doAuthenticate(UsernamePasswordToken token) {
|
||||||
if (!userPasswdStore.verifyPassword(token.principal(), token.credentials())) {
|
if (!userPasswdStore.verifyPassword(token.principal(), token.credentials())) {
|
||||||
|
|
Loading…
Reference in New Issue