Codota Logo
SaslClient.getNegotiatedProperty
Code IndexAdd Codota to your IDE (free)

How to use
getNegotiatedProperty
method
in
javax.security.sasl.SaslClient

Best Java code snippets using javax.security.sasl.SaslClient.getNegotiatedProperty (Showing top 20 results out of 468)

  • Common ways to obtain SaslClient
private void myMethod () {
SaslClient s =
  • Codota IconString[] string;String str;String str2;Map map;CallbackHandler callbackHandler;Sasl.createSaslClient(string, null, str, str2, map, callbackHandler)
  • Codota IconString protocol;String serverName;CallbackHandler callbackHandler;String authorizationId;new AnonymousSaslClient(protocol, serverName, callbackHandler, authorizationId)
  • Codota IconAbstractDelegatingSaslClient zuper;zuper.dispose()
  • Smart code suggestions by Codota
}
origin: apache/hbase

 public String getSaslQOP() {
  return (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 }
}
origin: apache/hive

@Override
protected String getNegotiatedProperty(String name) {
 return (String) client.getNegotiatedProperty(name);
}
origin: wildfly/wildfly

public Object getNegotiatedProperty(final String propName) {
  return delegate.getNegotiatedProperty(propName);
}
origin: apache/hbase

private String getNegotiatedQop() {
 return (String) saslClient.getNegotiatedProperty(Sasl.QOP);
}
origin: apache/hbase

public String getSaslQOP() {
 return (String) saslClient.getNegotiatedProperty(Sasl.QOP);
}
origin: apache/hbase

private boolean useWrap() {
 String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 return qop != null && !"auth".equalsIgnoreCase(qop);
}
origin: org.apache.hadoop/hadoop-common

private boolean useWrap() {
 // getNegotiatedProperty throws if client isn't complete
 String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 // SASL wrapping is only used if the connection has a QOP, and
 // the value is not auth.  ex. auth-int & auth-priv
 return qop != null && !"auth".toLowerCase(Locale.ENGLISH).equals(qop);
}
origin: org.apache.hadoop/hadoop-common

/**
 * Constructs a SASLInputStream from an InputStream and a SaslClient <br>
 * Note: if the specified InputStream or SaslClient is null, a
 * NullPointerException may be thrown later when they are used.
 * 
 * @param inStream
 *          the InputStream to be processed
 * @param saslClient
 *          an initialized SaslClient object
 */
public SaslInputStream(InputStream inStream, SaslClient saslClient) {
 this.inStream = new DataInputStream(inStream);
 this.saslServer = null;
 this.saslClient = saslClient;
 String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 this.useWrap = qop != null && !"auth".equalsIgnoreCase(qop);
}
origin: wildfly/wildfly

@Override
public boolean needsWrapping() {
  if (client.isComplete()) {
    String qop = (String) client.getNegotiatedProperty(Sasl.QOP);
    return (qop != null && (qop.equalsIgnoreCase("auth-int") || qop.equalsIgnoreCase("auth-conf")));
  } else {
    return false;
  }
}
origin: org.apache.hadoop/hadoop-common

/**
 * Constructs a SASLOutputStream from an OutputStream and a SaslClient <br>
 * Note: if the specified OutputStream or SaslClient is null, a
 * NullPointerException may be thrown later when they are used.
 * 
 * @param outStream
 *          the OutputStream to be processed
 * @param saslClient
 *          an initialized SaslClient object
 */
public SaslOutputStream(OutputStream outStream, SaslClient saslClient) {
 this.saslServer = null;
 this.saslClient = saslClient;
 String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 this.useWrap = qop != null && !"auth".equalsIgnoreCase(qop);
 if (useWrap) {
  this.outStream = new BufferedOutputStream(outStream, 64*1024);
 } else {
  this.outStream = outStream;
 }
}
origin: org.apache.hadoop/hadoop-common

@VisibleForTesting
@InterfaceAudience.Private
public Object getNegotiatedProperty(String key) {
 return (saslClient != null) ? saslClient.getNegotiatedProperty(key) : null;
}
origin: apache/avro

public Object getNegotiatedProperty(String propName) {
 if (client != null)
  return client.getNegotiatedProperty(propName);
 else
  return server.getNegotiatedProperty(propName);
}
origin: apache/hbase

public void setupSaslHandler(ChannelPipeline p) {
 String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 LOG.trace("SASL client context established. Negotiated QoP {}", qop);
 if (qop == null || "auth".equalsIgnoreCase(qop)) {
  return;
 }
 // add wrap and unwrap handlers to pipeline.
 p.addFirst(new SaslWrapHandler(saslClient),
  new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4),
  new SaslUnwrapHandler(saslClient));
}
origin: org.apache.hadoop/hadoop-common

/**
 * Get SASL wrapped OutputStream if SASL QoP requires wrapping,
 * otherwise return original stream.  Can be called only after
 * saslConnect() has been called.
 * 
 * @param out - OutputStream used to make the connection
 * @return OutputStream that may be using wrapping
 * @throws IOException
 */
public OutputStream getOutputStream(OutputStream out) throws IOException {
 if (useWrap()) {
  // the client and server negotiate a maximum buffer size that can be
  // wrapped
  String maxBuf = (String)saslClient.getNegotiatedProperty(Sasl.RAW_SEND_SIZE);
  out = new BufferedOutputStream(new WrappedOutputStream(out),
                  Integer.parseInt(maxBuf));
 }
 return out;
}
origin: apache/hbase

+ saslClient.getNegotiatedProperty(Sasl.QOP));
origin: apache/drill

final String negotiatedQOP = saslClient.getNegotiatedProperty(Sasl.QOP).toString();
final String expectedQOP = connection.isEncryptionEnabled()
  ? SaslProperties.QualityOfProtection.PRIVACY.getSaslQop()
   saslClient.getNegotiatedProperty(Sasl.RAW_SEND_SIZE).toString());
 if (negotiatedRawSendSize <= 0) {
  throw new SaslException(String.format("Negotiated rawSendSize: %d is invalid. Please check the configured " +
origin: wildfly/wildfly

final Object principalObj = saslClient.getNegotiatedProperty(WildFlySasl.PRINCIPAL);
safeDispose(saslClient);
origin: wildfly/wildfly

  return;
final Object qop = saslClient.getNegotiatedProperty(Sasl.QOP);
if ("auth-int".equals(qop) || "auth-conf".equals(qop)) {
  connection.setSaslWrapper(SaslWrapper.create(saslClient));
final Object principalObj = saslClient.getNegotiatedProperty(WildFlySasl.PRINCIPAL);
origin: org.apache.thrift/libthrift

 public Object getNegotiatedProperty(String propName) {
  if (saslClient != null)
   return saslClient.getNegotiatedProperty(propName);
  else
   return saslServer.getNegotiatedProperty(propName);
 }
}
origin: org.apache.hbase/hbase-client

public void setupSaslHandler(ChannelPipeline p) {
 String qop = (String) saslClient.getNegotiatedProperty(Sasl.QOP);
 LOG.trace("SASL client context established. Negotiated QoP {}", qop);
 if (qop == null || "auth".equalsIgnoreCase(qop)) {
  return;
 }
 // add wrap and unwrap handlers to pipeline.
 p.addFirst(new SaslWrapHandler(saslClient),
  new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4),
  new SaslUnwrapHandler(saslClient));
}
javax.security.saslSaslClientgetNegotiatedProperty

Popular methods of SaslClient

  • evaluateChallenge
  • hasInitialResponse
  • isComplete
  • dispose
  • unwrap
  • wrap
  • getMechanismName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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