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

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

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

AuthScope.getOrigin介绍

暂无

代码示例

代码示例来源: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: com.impetus.fabric/fabric-jdbc-driver-shaded

final HttpHost origin = authscope.getOrigin();
final String protocol = origin != null ? origin.getSchemeName() : (authscope.getPort() == 443 ? "https" : "http");
PasswordAuthentication systemcreds = getSystemCreds(protocol, authscope, Authenticator.RequestorType.SERVER);

代码示例来源: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: com.hynnet/httpclient

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

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

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

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

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

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

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

相关文章