@Override protected RadiusResponse authenticateRequest(final RadiusClient client, final AccessRequest accessRequest) throws Exception { val authenticator = getRadiusAuthenticator(); authenticator.setupRequest(client, accessRequest); authenticator.processRequest(accessRequest); return client.sendReceive(accessRequest, getRetries()); }
auth.processRequest(p);
/** * @throws NoSuchAlgorithmException * @see net.jradius.client.auth.RadiusAuthenticator#setupRequest(net.jradius.client.RadiusClient, net.jradius.packet.RadiusPacket) */ public void setupRequest(RadiusClient c, RadiusPacket p) throws RadiusException, NoSuchAlgorithmException { super.setupRequest(c, p); tunnelRequest = new AccessRequest(tunneledAttributes); AttributeList attrs = tunnelRequest.getAttributes(); if (attrs.get(Attr_UserName.TYPE) == null) attrs.add(AttributeFactory.copyAttribute(username, false)); if (attrs.get(Attr_UserPassword.TYPE) == null) attrs.add(AttributeFactory.copyAttribute(password, false)); tunnelAuth.setupRequest(c, tunnelRequest); if (!(tunnelAuth instanceof PAPAuthenticator)) // do not encode pap password { tunnelAuth.processRequest(tunnelRequest); } }
/** * @throws NoSuchAlgorithmException * @see net.jradius.client.auth.RadiusAuthenticator#setupRequest(net.jradius.client.RadiusClient, net.jradius.packet.RadiusPacket) */ public void setupRequest(RadiusClient c, RadiusPacket p) throws RadiusException, NoSuchAlgorithmException { super.setupRequest(c, p); tunnelRequest = new AccessRequest(tunneledAttributes); AttributeList attrs = tunnelRequest.getAttributes(); if (attrs.get(Attr_UserName.TYPE) == null) attrs.add(AttributeFactory.copyAttribute(username, false)); if (attrs.get(Attr_UserPassword.TYPE) == null) attrs.add(AttributeFactory.copyAttribute(password, false)); tunnelAuth.setupRequest(c, tunnelRequest); if (!(tunnelAuth instanceof PAPAuthenticator)) // do not encode pap password { tunnelAuth.processRequest(tunnelRequest); } }
/** * @throws NoSuchAlgorithmException * @see net.jradius.client.auth.RadiusAuthenticator#setupRequest(net.jradius.client.RadiusClient, net.jradius.packet.RadiusPacket) */ public void setupRequest(RadiusClient c, RadiusPacket p) throws RadiusException, NoSuchAlgorithmException { super.setupRequest(c, p); tunnelRequest = new AccessRequest(tunneledAttributes); AttributeList attrs = tunnelRequest.getAttributes(); if (attrs.get(Attr_UserName.TYPE) == null) attrs.add(AttributeFactory.copyAttribute(username, false)); if (attrs.get(Attr_UserPassword.TYPE) == null) attrs.add(AttributeFactory.copyAttribute(password, false)); tunnelAuth.setupRequest(c, tunnelRequest); if (!(tunnelAuth instanceof PAPAuthenticator)) // do not encode pap password { tunnelAuth.processRequest(tunnelRequest); } }