本文整理匯總了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);
}
}