Codota Logo
IAuthenticator$SaslNegotiator
Code IndexAdd Codota to your IDE (free)

How to use
IAuthenticator$SaslNegotiator
in
org.apache.cassandra.auth

Best Java code snippets using org.apache.cassandra.auth.IAuthenticator$SaslNegotiator (Showing top 3 results out of 315)

  • Common ways to obtain IAuthenticator$SaslNegotiator
private void myMethod () {
IAuthenticator$SaslNegotiator i =
  • Codota Iconnew PlainTextSaslAuthenticator()
  • Codota IconQueryState queryState;DatabaseDescriptor.getAuthenticator().newSaslNegotiator(queryState.getClientAddress())
  • Smart code suggestions by Codota
}
origin: org.apache.cassandra/cassandra-all

  @Override
  public Response execute(QueryState queryState, long queryStartNanoTime)
  {
    try
    {
      IAuthenticator.SaslNegotiator negotiator = ((ServerConnection) connection).getSaslNegotiator(queryState);
      byte[] challenge = negotiator.evaluateResponse(token);
      if (negotiator.isComplete())
      {
        AuthenticatedUser user = negotiator.getAuthenticatedUser();
        queryState.getClientState().login(user);
        AuthMetrics.instance.markSuccess();
        // authentication is complete, send a ready message to the client
        return new AuthSuccess(challenge);
      }
      else
      {
        return new AuthChallenge(challenge);
      }
    }
    catch (AuthenticationException e)
    {
      AuthMetrics.instance.markFailure();
      return ErrorMessage.fromException(e);
    }
  }
}
origin: jsevellec/cassandra-unit

  @Override
  public Response execute(QueryState queryState, long queryStartNanoTime)
  {
    try
    {
      IAuthenticator.SaslNegotiator negotiator = ((ServerConnection) connection).getSaslNegotiator(queryState);
      byte[] challenge = negotiator.evaluateResponse(token);
      if (negotiator.isComplete())
      {
        AuthenticatedUser user = negotiator.getAuthenticatedUser();
        queryState.getClientState().login(user);
        AuthMetrics.instance.markSuccess();
        // authentication is complete, send a ready message to the client
        return new AuthSuccess(challenge);
      }
      else
      {
        return new AuthChallenge(challenge);
      }
    }
    catch (AuthenticationException e)
    {
      AuthMetrics.instance.markFailure();
      return ErrorMessage.fromException(e);
    }
  }
}
origin: com.strapdata.cassandra/cassandra-all

  @Override
  public Response execute(QueryState queryState, long queryStartNanoTime)
  {
    try
    {
      IAuthenticator.SaslNegotiator negotiator = ((ServerConnection) connection).getSaslNegotiator(queryState);
      byte[] challenge = negotiator.evaluateResponse(token);
      if (negotiator.isComplete())
      {
        AuthenticatedUser user = negotiator.getAuthenticatedUser();
        queryState.getClientState().login(user);
        AuthMetrics.instance.markSuccess();
        // authentication is complete, send a ready message to the client
        return new AuthSuccess(challenge);
      }
      else
      {
        return new AuthChallenge(challenge);
      }
    }
    catch (AuthenticationException e)
    {
      AuthMetrics.instance.markFailure();
      return ErrorMessage.fromException(e);
    }
  }
}
org.apache.cassandra.authIAuthenticator$SaslNegotiator

Javadoc

Performs the actual SASL negotiation for a single authentication attempt. SASL is stateful, so a new instance should be used for each attempt. Non-trivial implementations may delegate to an instance of javax.security.sasl.SaslServer

Most used methods

  • evaluateResponse
    Evaluates the client response data and generates a byte[] reply which may be a further challenge or
  • getAuthenticatedUser
    Following a sucessful negotiation, get the AuthenticatedUser representing the logged in subject. Thi
  • isComplete
    Called after each invocation of evaluateResponse(byte[]) to determine whether the authentication has

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getSystemService (Context)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now