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


Java PAPAuthenticator類代碼示例

本文整理匯總了Java中net.jradius.client.auth.PAPAuthenticator的典型用法代碼示例。如果您正苦於以下問題:Java PAPAuthenticator類的具體用法?Java PAPAuthenticator怎麽用?Java PAPAuthenticator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PAPAuthenticator類屬於net.jradius.client.auth包,在下文中一共展示了PAPAuthenticator類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setAuthTypeClass

import net.jradius.client.auth.PAPAuthenticator; //導入依賴的package包/類
/**
 * Sets the authenticator, which determines the authentication type (PAP, CHAP, etc)
 *
 * @param authTypeClass An instance of net.jradius.client.auth.RadiusAuthenticator (defaults to PAPAuthenticator)
 */
public void setAuthTypeClass(RadiusAuthenticator authTypeClass) {
    if (authTypeClass instanceof PAPAuthenticator) {
        // There is a bug in PAPAuthenticator() that prevents instances of the class
        // from being reused. Set the authenticator class to null to work around this
        // problem.
        this.authTypeClass = null;
    } else {
        this.authTypeClass = authTypeClass;
    }
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:16,代碼來源:RadiusAuthenticationProvider.java

示例2: testRetrieveUserPap

import net.jradius.client.auth.PAPAuthenticator; //導入依賴的package包/類
@Test
@Ignore("Need to have a RADIUS server running on localhost")
public void testRetrieveUserPap() throws IOException {
	RadiusAuthenticationProvider provider = new RadiusAuthenticationProvider(m_radiusServer, m_sharedSecret);
	RadiusAuthenticator authTypeClass = new PAPAuthenticator();

	provider.setAuthTypeClass(authTypeClass);
	provider.setRolesAttribute("Unknown-VSAttribute(5813:1)");

	UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(m_principal, m_credentials);
	provider.retrieveUser(m_username, token);
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:13,代碼來源:RadiusAuthenticationProviderTest.java

示例3: testRetrieveUserMultipleTimesPAP

import net.jradius.client.auth.PAPAuthenticator; //導入依賴的package包/類
@Test
@Ignore("Need to have a RADIUS server running on localhost")
public void testRetrieveUserMultipleTimesPAP() throws IOException {
	doTestRetrieveUserMultipleTimes(new PAPAuthenticator());
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:6,代碼來源:RadiusAuthenticationProviderTest.java


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