本文整理汇总了Java中org.apache.http.impl.auth.NTLMEngineException类的典型用法代码示例。如果您正苦于以下问题:Java NTLMEngineException类的具体用法?Java NTLMEngineException怎么用?Java NTLMEngineException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NTLMEngineException类属于org.apache.http.impl.auth包,在下文中一共展示了NTLMEngineException类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decodeType2Message
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
private Type2Message decodeType2Message(String challenge) throws NTLMEngineException {
try {
return new Type2Message(Base64.decode(challenge));
} catch (final IOException exception) {
throw new NTLMEngineException("Invalid Type2 message", exception);
}
}
示例2: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
@Override
public String generateType1Msg(String domain, String workstation) throws NTLMEngineException {
CredHandle credentials = acquireCredentialsHandle();
try {
byte[] token = nextToken(credentials, null);
return Base64.encodeBase64String(token);
} finally {
dispose(credentials);
}
}
示例3: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
@Override
public String generateType1Msg(final String domain, final String workstation)
throws NTLMEngineException {
final Type1Message type1Message = new Type1Message(TYPE_1_FLAGS,
domain, workstation);
return Base64.encode(type1Message.toByteArray());
}
示例4: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
public String generateType1Msg(String domain, String workstation) throws NTLMEngineException {
Type1Message type1Message = new Type1Message(Type1Message.getDefaultFlags(), domain, workstation);
return Base64.encode(type1Message.toByteArray());
}
示例5: generateType3Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
public String generateType3Msg(String username, String password, String domain, String workstation, String challenge) throws NTLMEngineException {
Type2Message type2Message = decodeType2Message(challenge);
Type3Message type3Message = new Type3Message(type2Message, password, domain, username, workstation, Type3Message.getDefaultFlags());
return Base64.encode(type3Message.toByteArray());
}
示例6: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
@Override
public String generateType1Msg(final String domain, final String workstation)
throws NTLMEngineException {
final Type1Message type1Message = new Type1Message(TYPE_1_FLAGS, domain, workstation);
return Base64.encode(type1Message.toByteArray());
}
示例7: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
public String generateType1Msg(final String domain, final String workstation) throws NTLMEngineException {
final Type1Message type1Message = new Type1Message(TYPE_1_FLAGS, domain, workstation);
return Base64.encode(type1Message.toByteArray());
}
示例8: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
public String generateType1Msg(final String domain, final String workstation)
throws NTLMEngineException {
final Type1Message type1Message = new Type1Message(TYPE_1_FLAGS, domain, workstation);
return Base64.encode(type1Message.toByteArray());
}
示例9: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
@Test
public void generateType1Msg() throws NTLMEngineException {
JCIFSEngine engine = new JCIFSEngine();
String type1Msg = engine.generateType1Msg("DOMAIN", "16.77.60");
assertEquals("TlRMTVNTUAABAAAABbIIoAYABgAgAAAACAAIACYAAABET01BSU4xNi43Ny42MA==", type1Msg);
}
示例10: generateType3Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
@Override
public String generateType3Msg(String username, String password, String domain, String workstation, String challenge) throws NTLMEngineException {
byte[] token = Base64.decodeBase64(challenge);
token = nextToken(null, token);
return Base64.encodeBase64String(token);
}
示例11: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
public String generateType1Msg(final String domain,
final String workstation) throws NTLMEngineException {
final Type1Message type1Message = new Type1Message(TYPE_1_FLAGS,
domain, workstation);
return Base64.encode(type1Message.toByteArray());
}
示例12: generateType1Msg
import org.apache.http.impl.auth.NTLMEngineException; //导入依赖的package包/类
public String generateType1Msg(String domain, String workstation) throws NTLMEngineException {
Type1Message t1m = new Type1Message(Type1Message.getDefaultFlags(), domain, workstation);
return Base64.encode(t1m.toByteArray());
}