use of org.apache.cassandra.exceptions.AuthenticationException in project cassandra by apache.
the class CredentialsMessage method execute.
public Message.Response execute(QueryState state, long queryStartNanoTime) {
try {
AuthenticatedUser user = DatabaseDescriptor.getAuthenticator().legacyAuthenticate(credentials);
state.getClientState().login(user);
AuthMetrics.instance.markSuccess();
} catch (AuthenticationException e) {
AuthMetrics.instance.markFailure();
return ErrorMessage.fromException(e);
}
return new ReadyMessage();
}
Aggregations