本文整理了Java中org.apache.http.auth.NTCredentials.getDomain()
方法的一些代码示例,展示了NTCredentials.getDomain()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NTCredentials.getDomain()
方法的具体详情如下:
包路径:org.apache.http.auth.NTCredentials
类名称:NTCredentials
方法名:getDomain
[英]Retrieves the name to authenticate with.
[中]检索要进行身份验证的名称。
代码示例来源:origin: robovm/robovm
if (this.state == State.CHALLENGE_RECEIVED || this.state == State.FAILED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源: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: stackoverflow.com
ntcredentials.getDomain());
ntcredentials.getDomain(), this.ntlmchallenge);
代码示例来源:origin: stackoverflow.com
msg.setSuppliedDomain(ntcredentials.getDomain());
msgBytes = msg.toByteArray();
this.state = TYPE1_MSG_GENERATED;
Type3Message msg3 =
new Type3Message(msg2, ntcredentials.getPassword(),
ntcredentials.getDomain(), ntcredentials
.getUserName(), ntcredentials.getHost());
msgBytes = msg3.toByteArray();
代码示例来源:origin: MobiVM/robovm
if (this.state == State.CHALLENGE_RECEIVED || this.state == State.FAILED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
if (this.state == State.CHALLENGE_RECEIVED || this.state == State.FAILED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: com.gluonhq/robovm-rt
if (this.state == State.CHALLENGE_RECEIVED || this.state == State.FAILED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: FlexoVM/flexovm
if (this.state == State.CHALLENGE_RECEIVED || this.state == State.FAILED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: ibinti/bugvm
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: org.apache.httpcomponents/httpclient-android
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: com.bugvm/bugvm-rt
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: com.hynnet/httpclient
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源:origin: Nextdoor/bender
} else if (this.state == State.CHALLENGE_RECEIVED) {
response = this.engine.generateType1Msg(
ntcredentials.getDomain(),
ntcredentials.getWorkstation());
this.state = State.MSG_TYPE1_GENERATED;
ntcredentials.getUserName(),
ntcredentials.getPassword(),
ntcredentials.getDomain(),
ntcredentials.getWorkstation(),
this.challenge);
代码示例来源: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());
}
内容来源于网络,如有侵权,请联系作者删除!