本文整理汇总了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());
}