Codota Logo
SASL.needsAuthentication
Code IndexAdd Codota to your IDE (free)

How to use
needsAuthentication
method
in
org.jgroups.protocols.SASL

Best Java code snippets using org.jgroups.protocols.SASL.needsAuthentication (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

public Object down(Message msg) {
  GmsHeader hdr =msg.getHeader(GMS_ID);
  Address remoteAddress = msg.getDest();
  if (needsAuthentication(hdr, remoteAddress)) {
    // We are a client who needs to authenticate
    SaslClientContext ctx = null;
    try {
      ctx = new SaslClientContext(saslClientFactory, mech, server_name != null ? server_name : remoteAddress.toString(), client_callback_handler, sasl_props, client_subject);
      sasl_context.put(remoteAddress, ctx);
      ctx.addHeader(msg, null);
    } catch (Exception e) {
      if (ctx != null) {
        disposeContext(remoteAddress);
      }
      throw new SecurityException(e);
    }
  }
  return down_prot.down(msg);
}
origin: wildfly/wildfly

@Override
public void up(MessageBatch batch) {
  for (Message msg : batch) {
    // If we have a join or merge request --> authenticate, else pass up
    GmsHeader gmsHeader =msg.getHeader(GMS_ID);
    Address remoteAddress = msg.getSrc();
    if (needsAuthentication(gmsHeader, remoteAddress)) {
      SaslHeader saslHeader =msg.getHeader(id);
      if (saslHeader == null) {
        log.warn("Found GMS join or merge request but no SASL header");
        sendRejectionMessage(gmsHeader.getType(), batch.sender(), "join or merge without an SASL header");
        batch.remove(msg);
      } else if (!serverChallenge(gmsHeader, saslHeader, msg)) // authentication failed
        batch.remove(msg); // don't pass up
    }
  }
  if (!batch.isEmpty())
    up_prot.up(batch);
}
origin: wildfly/wildfly

GmsHeader gmsHeader =msg.getHeader(GMS_ID);
Address remoteAddress = msg.getSrc();
if (needsAuthentication(gmsHeader, remoteAddress)) {
  if (saslHeader == null)
    throw new IllegalStateException("Found GMS join or merge request but no SASL header");
origin: org.jboss.eap/wildfly-client-all

public Object down(Message msg) {
  GmsHeader hdr =msg.getHeader(GMS_ID);
  Address remoteAddress = msg.getDest();
  if (needsAuthentication(hdr, remoteAddress)) {
    // We are a client who needs to authenticate
    SaslClientContext ctx = null;
    try {
      ctx = new SaslClientContext(saslClientFactory, mech, server_name != null ? server_name : remoteAddress.toString(), client_callback_handler, sasl_props, client_subject);
      sasl_context.put(remoteAddress, ctx);
      ctx.addHeader(msg, null);
    } catch (Exception e) {
      if (ctx != null) {
        disposeContext(remoteAddress);
      }
      throw new SecurityException(e);
    }
  }
  return down_prot.down(msg);
}
origin: org.jboss.eap/wildfly-client-all

@Override
public void up(MessageBatch batch) {
  for (Message msg : batch) {
    // If we have a join or merge request --> authenticate, else pass up
    GmsHeader gmsHeader =msg.getHeader(GMS_ID);
    Address remoteAddress = msg.getSrc();
    if (needsAuthentication(gmsHeader, remoteAddress)) {
      SaslHeader saslHeader =msg.getHeader(id);
      if (saslHeader == null) {
        log.warn("Found GMS join or merge request but no SASL header");
        sendRejectionMessage(gmsHeader.getType(), batch.sender(), "join or merge without an SASL header");
        batch.remove(msg);
      } else if (!serverChallenge(gmsHeader, saslHeader, msg)) // authentication failed
        batch.remove(msg); // don't pass up
    }
  }
  if (!batch.isEmpty())
    up_prot.up(batch);
}
origin: org.jboss.eap/wildfly-client-all

GmsHeader gmsHeader =msg.getHeader(GMS_ID);
Address remoteAddress = msg.getSrc();
if (needsAuthentication(gmsHeader, remoteAddress)) {
  if (saslHeader == null)
    throw new IllegalStateException("Found GMS join or merge request but no SASL header");
org.jgroups.protocolsSASLneedsAuthentication

Popular methods of SASL

  • cleanup
  • disposeContext
  • getAddress
  • getDownProtocol
  • isSelf
  • sendJoinRejectionMessage
  • sendMergeRejectionMessage
  • sendRejectionMessage
  • serverChallenge
  • <init>
  • init
  • setClientCallbackHandler
  • init,
  • setClientCallbackHandler,
  • setMech,
  • setServerCallbackHandler

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JButton (javax.swing)
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Runner (org.openjdk.jmh.runner)
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