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