本文整理汇总了Java中org.ietf.jgss.GSSName.NT_ANONYMOUS属性的典型用法代码示例。如果您正苦于以下问题:Java GSSName.NT_ANONYMOUS属性的具体用法?Java GSSName.NT_ANONYMOUS怎么用?Java GSSName.NT_ANONYMOUS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.ietf.jgss.GSSName
的用法示例。
在下文中一共展示了GSSName.NT_ANONYMOUS属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOidForType
private Oid getOidForType(
String type ) {
if ("NT_USER_NAME".equals(type)) {
return GSSName.NT_USER_NAME;
} else if ("NT_HOSTBASED_SERVICE".equals(type)) {
return GSSName.NT_HOSTBASED_SERVICE;
} else if ("NT_MACHINE_UID_NAME".equals(type)) {
return GSSName.NT_MACHINE_UID_NAME;
} else if ("NT_STRING_UID_NAME".equals(type)) {
return GSSName.NT_STRING_UID_NAME;
} else if ("NT_ANONYMOUS".equals(type)) {
return GSSName.NT_ANONYMOUS;
} else if ("NT_EXPORT_NAME".equals(type)) {
return GSSName.NT_EXPORT_NAME;
}
return GSSName.NT_USER_NAME;
}
示例2: testGetMechsForName
public void testGetMechsForName() throws Exception {
Oid nameType = GSSName.NT_ANONYMOUS;
Oid[] mechs = gssManager.getMechsForName(nameType);
assertEquals(0, mechs.length);
nameType = GSSName.NT_MACHINE_UID_NAME;
mechs = gssManager.getMechsForName(nameType);
assertEquals(0, mechs.length);
nameType = GSSName.NT_STRING_UID_NAME;
mechs = gssManager.getMechsForName(nameType);
assertEquals(0, mechs.length);
nameType = GSSName.NT_USER_NAME;
mechs = gssManager.getMechsForName(nameType);
Oid kerberosMech = new Oid("1.2.840.113554.1.2.2");
Oid[] expectedMechs = new Oid[] { kerberosMech };
assertTrue(Arrays.equals(expectedMechs, mechs));
nameType = GSSName.NT_HOSTBASED_SERVICE;
mechs = gssManager.getMechsForName(nameType);
assertTrue(Arrays.equals(expectedMechs, mechs));
nameType = GSSName.NT_EXPORT_NAME;
mechs = gssManager.getMechsForName(nameType);
assertTrue(Arrays.equals(expectedMechs, mechs));
nameType = KerberosUtils.KRB5_PRINCIPAL_NAMETYPE;
mechs = gssManager.getMechsForName(nameType);
assertTrue(Arrays.equals(expectedMechs, mechs));
}
示例3: GlobusGSSName
public GlobusGSSName(byte[] name) {
if (name == null) {
this.nameType = GSSName.NT_ANONYMOUS;
this.name = null;
} else {
this.name = new X509Name(name);
}
}