private RadiusAuthenticator createAuthenticator(Class<? extends RadiusAuthenticator> authTypeClass) throws IllegalAccessException, InstantiationException { if (authTypeClass == null) { return new PAPAuthenticator(); } return authTypeClass.newInstance(); }
public RadiusAuthenticator getAuthenticator() { final RadiusAuthenticator auth; final String authType = getAuthType(); if (authType.equalsIgnoreCase("chap")) { auth = new CHAPAuthenticator(); } else if (authType.equalsIgnoreCase("pap")) { auth = new PAPAuthenticator(); } else if (authType.equalsIgnoreCase("mschapv1")) { auth = new MSCHAPv1Authenticator(); } else if (authType.equalsIgnoreCase("mschapv2")) { auth = new MSCHAPv2Authenticator(); } else if (authType.equalsIgnoreCase("eapmd5") || authType.equalsIgnoreCase("eap-md5")) { auth = new EAPMD5Authenticator(); } else if (authType.equalsIgnoreCase("eapmschapv2") || authType.equalsIgnoreCase("eap-mschapv2")) { auth = new EAPMSCHAPv2Authenticator(); } else if (RadiusUtils.isEAPTTLS(authType)) { auth = new EAPTTLSAuthenticator(); } else { auth = null; } return auth; }
throws RadiusException, UnknownAttributeException, NoSuchAlgorithmException if (auth == null) auth = new PAPAuthenticator();
throws RadiusException, UnknownAttributeException, NoSuchAlgorithmException if (auth == null) auth = new PAPAuthenticator();
auth = new CHAPAuthenticator(); } else if (authType.equalsIgnoreCase("pap")) { auth = new PAPAuthenticator(); } else if (authType.equalsIgnoreCase("mschapv1")) { auth = new MSCHAPv1Authenticator();