org.apache.http.auth.AuthScope.getScheme()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中org.apache.http.auth.AuthScope.getScheme()方法的一些代码示例,展示了AuthScope.getScheme()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AuthScope.getScheme()方法的具体详情如下:
包路径:org.apache.http.auth.AuthScope
类名称:AuthScope
方法名:getScheme

AuthScope.getScheme介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: org.apache.httpcomponents/httpclient-win

@Override
public Credentials getCredentials(final AuthScope authscope) {
  final String scheme = authscope.getScheme();
  if (AuthSchemes.NTLM.equalsIgnoreCase(scheme) || AuthSchemes.SPNEGO.equalsIgnoreCase(scheme)) {
    return CurrentWindowsCredentials.INSTANCE;
  } else {
    return provider.getCredentials(authscope);
  }
}

代码示例来源:origin: HtmlUnit/htmlunit

private void writeObject(final ObjectOutputStream stream) throws IOException {
  stream.writeObject(authScope_.getHost());
  stream.writeInt(authScope_.getPort());
  stream.writeObject(authScope_.getRealm());
  stream.writeObject(authScope_.getScheme());
}

代码示例来源:origin: net.sourceforge.htmlunit/htmlunit

private void writeObject(final ObjectOutputStream stream) throws IOException {
  stream.writeObject(authScope_.getHost());
  stream.writeInt(authScope_.getPort());
  stream.writeObject(authScope_.getRealm());
  stream.writeObject(authScope_.getScheme());
}
private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException {

代码示例来源:origin: edu.ucar/httpservices

static public void serializeScope(AuthScope scope, ObjectOutputStream oos)
  throws IOException
{
  oos.writeObject(scope.getHost());
  oos.writeInt(scope.getPort());
  oos.writeObject(scope.getRealm());
  oos.writeObject(scope.getScheme());
}

代码示例来源:origin: Unidata/thredds

static HttpHost authscopeToHost(AuthScope scope)
{
  return new HttpHost(scope.getHost(), scope.getPort(), scope.getScheme());
}

代码示例来源:origin: org.ferris/ferris-net

/**
 * Basic setter
 */
private void setAuthScope(AuthScope authScope) {
  this.authScope = authScope;
  log.info("Host=\"" + authScope.getHost() + "\"");
  log.info("Port=\"" + authScope.getPort() + "\"");
  log.info("Realm=\"" + authScope.getRealm() + "\"");
  log.info("Scheme=\"" + authScope.getScheme() + "\"");
}

代码示例来源:origin: com.gluonhq/robovm-rt

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: MobiVM/robovm

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: FlexoVM/flexovm

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/** 
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  if (authscope == null) {
    throw new IllegalArgumentException("Scope may not be null");
  }
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
}

代码示例来源:origin: org.apache.httpcomponents/httpclient-android

private static PasswordAuthentication getSystemCreds(
    final AuthScope authscope,
    final Authenticator.RequestorType requestorType) {
  final String hostname = authscope.getHost();
  final int port = authscope.getPort();
  final String protocol = port == 443 ? "https" : "http";
  return Authenticator.requestPasswordAuthentication(
      hostname,
      null,
      port,
      protocol,
      null,
      translateScheme(authscope.getScheme()),
      null,
      requestorType);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

private static PasswordAuthentication getSystemCreds(
    final String protocol,
    final AuthScope authscope,
    final Authenticator.RequestorType requestorType) {
  return Authenticator.requestPasswordAuthentication(
      authscope.getHost(),
      null,
      authscope.getPort(),
      protocol,
      null,
      translateScheme(authscope.getScheme()),
      null,
      requestorType);
}

代码示例来源:origin: com.hynnet/httpclient

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: Nextdoor/bender

/**
 * Creates a copy of the given credentials scope.
 */
public AuthScope(final AuthScope authscope) {
  super();
  Args.notNull(authscope, "Scope");
  this.host = authscope.getHost();
  this.port = authscope.getPort();
  this.realm = authscope.getRealm();
  this.scheme = authscope.getScheme();
  this.origin = authscope.getOrigin();
}

代码示例来源:origin: adolfAn/FBReader_AS

public int hashCode() {
    if (myScope == null) {
      return 0;
    }
    return
      myScope.getPort() +
      ComparisonUtil.hashCode(myScope.getHost()) +
      ComparisonUtil.hashCode(myScope.getScheme()) +
      ComparisonUtil.hashCode(myScope.getRealm());
  }
}

相关文章