本文整理汇总了Java中net.jradius.client.RadiusClient.getAuthProtocol方法的典型用法代码示例。如果您正苦于以下问题:Java RadiusClient.getAuthProtocol方法的具体用法?Java RadiusClient.getAuthProtocol怎么用?Java RadiusClient.getAuthProtocol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.jradius.client.RadiusClient
的用法示例。
在下文中一共展示了RadiusClient.getAuthProtocol方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.jradius.client.RadiusClient; //导入方法依赖的package包/类
public void init() throws RadiusException
{
super.init();
tunnelAuth = RadiusClient.getAuthProtocol(getInnerProtocol());
if (tunnelAuth == null ||
tunnelAuth instanceof MSCHAPv2Authenticator ||
tunnelAuth instanceof MSCHAPv1Authenticator ||
tunnelAuth instanceof CHAPAuthenticator)
{
throw new RadiusException("You can not currently use " + tunnelAuth.getAuthName() +" within a TLS Tunnel because of limitations in Java 1.5.");
}
}
示例2: getAuthenticator
import net.jradius.client.RadiusClient; //导入方法依赖的package包/类
private RadiusAuthenticator getAuthenticator() throws Exception
{
String authName = authTypeNames[authTypeComboBox.getSelectedIndex()];
if (authName.startsWith("EAP-T") || authName.startsWith("PEAP"))
{
if (isJava14)
{
throw new Exception(authName + " not available with this Java version");
}
String s[] = authName.split("/");
StringBuffer sb = new StringBuffer(s[0]);
String v = tlsKeyFileTextField.getText();
if (v != null && !"".equals(v))
{
sb.append(":keyFile=").append(v);
}
v = (String)tlsKeyFileTypeComboBox.getSelectedItem();
if (v != null && !"".equals(v))
{
sb.append(":keyFileType=").append(v);
}
v = tlsKeyPasswordTextField.getText();
if (v != null && !"".equals(v))
{
sb.append(":keyPassword=").append(v);
}
v = tlsCAFileTextField.getText();
if (v != null && !"".equals(v))
{
sb.append(":caFile=").append(v);
}
v = (String)tlsCAFileTypeComboBox.getSelectedItem();
if (v != null && !"".equals(v))
{
sb.append(":caFileType=").append(v);
}
v = tlsCAPasswordTextField.getText();
if (v != null && !"".equals(v))
{
sb.append(":caPassword=").append(v);
}
if (tlsTrustAll.isSelected())
{
sb.append(":trustAll=true");
}
if (s.length == 2)
{
sb.append(":innerProtocol=").append(s[1]);
}
authName = sb.toString();
System.out.println("Using Authenticator String: " + authName);
}
return RadiusClient.getAuthProtocol(authName);
}