當前位置: 首頁>>代碼示例>>Java>>正文


Java GSSName.NT_ANONYMOUS屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:Axway,項目名稱:ats-framework,代碼行數:18,代碼來源:SPNegoSchemeFactory.java

示例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));
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:31,代碼來源:GSSManagerImplTest.java

示例3: GlobusGSSName

public GlobusGSSName(byte[] name) {
if (name == null) {
    this.nameType = GSSName.NT_ANONYMOUS;
    this.name = null;
} else {
    this.name = new X509Name(name);
}
   }
 
開發者ID:NCIP,項目名稱:cagrid-general,代碼行數:8,代碼來源:GlobusGSSName.java


注:本文中的org.ietf.jgss.GSSName.NT_ANONYMOUS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。