本文整理了Java中org.apache.http.auth.NTCredentials.getWorkstation()
方法的一些代码示例,展示了NTCredentials.getWorkstation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NTCredentials.getWorkstation()
方法的具体详情如下:
包路径:org.apache.http.auth.NTCredentials
类名称:NTCredentials
方法名:getWorkstation
[英]Retrieves the workstation name of the computer originating the request.
[中]检索发起请求的计算机的工作站名称。
代码示例来源:origin: robovm/robovm
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
/**
* {@inheritDoc}
*/
@Override
public synchronized void setCredentials(final AuthScope authscope, final Credentials credentials) {
if (authscope == null) {
throw new IllegalArgumentException("Authentication scope may not be null");
}
final CredentialsFactory factory;
if (credentials instanceof UsernamePasswordCredentials) {
final UsernamePasswordCredentials userCredentials = (UsernamePasswordCredentials) credentials;
factory = new UsernamePasswordCredentialsFactory(userCredentials.getUserName(),
userCredentials.getPassword());
}
else if (credentials instanceof NTCredentials) {
final NTCredentials ntCredentials = (NTCredentials) credentials;
factory = new NTCredentialsFactory(ntCredentials.getUserName(), ntCredentials.getPassword(),
ntCredentials.getWorkstation(), ntCredentials.getDomain());
}
else {
throw new IllegalArgumentException("Unsupported Credential type: " + credentials.getClass().getName());
}
credentialsMap_.put(new AuthScopeProxy(authscope), factory);
}
代码示例来源:origin: MobiVM/robovm
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: ibinti/bugvm
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: com.gluonhq/robovm-rt
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: FlexoVM/flexovm
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: org.apache.httpcomponents/httpclient-android
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: com.bugvm/bugvm-rt
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: com.hynnet/httpclient
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: Nextdoor/bender
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
} else if (this.state == State.MSG_TYPE2_RECEVIED) {
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
this.state = State.MSG_TYPE3_GENERATED;
代码示例来源:origin: Microsoft/azure-devops-intellij
private void createAndVerifyNTCredentials(final String domain, final String name, final String domainName, final String pass) {
final AuthenticationInfo info = new AuthenticationInfo(domainName, pass, "server", "display");
final Credentials credentials = AuthHelper.getCredentials(ServerContext.Type.TFS, info);
Assert.assertTrue(credentials instanceof NTCredentials);
Assert.assertEquals(name, ((NTCredentials) credentials).getUserName());
Assert.assertEquals(domain, ((NTCredentials) credentials).getDomain().toLowerCase());
if(SystemHelper.getComputerName() != null) { //coming back null when running from command line on Mac, works inside IDE
Assert.assertEquals(SystemHelper.getComputerName().toLowerCase(), ((NTCredentials) credentials).getWorkstation().toLowerCase());
}
Assert.assertEquals(pass, credentials.getPassword());
}
内容来源于网络,如有侵权,请联系作者删除!