本文整理汇总了Java中java.net.Authenticator.RequestorType方法的典型用法代码示例。如果您正苦于以下问题:Java Authenticator.RequestorType方法的具体用法?Java Authenticator.RequestorType怎么用?Java Authenticator.RequestorType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.net.Authenticator
的用法示例。
在下文中一共展示了Authenticator.RequestorType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSystemCreds
import java.net.Authenticator; //导入方法依赖的package包/类
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);
}
示例2: getSystemCreds
import java.net.Authenticator; //导入方法依赖的package包/类
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);
}
示例3: getSystemCreds
import java.net.Authenticator; //导入方法依赖的package包/类
private static PasswordAuthentication getSystemCreds(
final AuthScope authscope,
final Authenticator.RequestorType requestorType) {
return Authenticator.requestPasswordAuthentication(
authscope.getHost(),
null,
authscope.getPort(),
"http",
null,
translateScheme(authscope.getScheme()),
null,
requestorType);
}
开发者ID:reportportal,项目名称:client-java-httpclient-repacked,代码行数:14,代码来源:SystemDefaultCredentialsProvider.java
示例4: getRequestorType
import java.net.Authenticator; //导入方法依赖的package包/类
protected Authenticator.RequestorType getRequestorType() {
return requestingAuthType;
}
示例5: setRequestorType
import java.net.Authenticator; //导入方法依赖的package包/类
protected void setRequestorType(Authenticator.RequestorType requestingAuthType) {
this.requestingAuthType = requestingAuthType;
}
示例6: getRequestorType
import java.net.Authenticator; //导入方法依赖的package包/类
public Authenticator.RequestorType getRequestorType() {
return super.getRequestorType();
}
示例7: getRequestorType
import java.net.Authenticator; //导入方法依赖的package包/类
@Override
public Authenticator.RequestorType getRequestorType() {
return super.getRequestorType();
}