@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()); }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { if (tunnelChallenge != null && in != null) { AttributeList list = tunnelChallenge.getAttributes(); list.clear(); ByteBuffer buffer = ByteBuffer.wrap(in); diameterFormat.unpackAttributes(list, buffer, buffer.limit(), false); if (tunnelAuth instanceof EAPAuthenticator && tunnelChallenge.findAttribute(Attr_EAPMessage.TYPE) == null) tunnelAuth.setupRequest(client, tunnelRequest); else tunnelAuth.processChallenge(tunnelRequest, tunnelChallenge); } else tunnelChallenge = new AccessChallenge(); ByteBuffer buffer = ByteBuffer.allocate(1500); diameterFormat.packAttributeList(tunnelRequest.getAttributes(), buffer, true); putAppBuffer(buffer.array(), 0, buffer.position()); RadiusLog.debug("Tunnel Request:\n" + tunnelRequest.toString()); return true; }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { if (tunnelChallenge != null && in != null) { AttributeList list = tunnelChallenge.getAttributes(); list.clear(); ByteBuffer buffer = ByteBuffer.wrap(in); diameterFormat.unpackAttributes(list, buffer, buffer.limit(), false); if (tunnelAuth instanceof EAPAuthenticator && tunnelChallenge.findAttribute(Attr_EAPMessage.TYPE) == null) tunnelAuth.setupRequest(client, tunnelRequest); else tunnelAuth.processChallenge(tunnelRequest, tunnelChallenge); } else tunnelChallenge = new AccessChallenge(); ByteBuffer buffer = ByteBuffer.allocate(1500); diameterFormat.packAttributeList(tunnelRequest.getAttributes(), buffer, true); putAppBuffer(buffer.array(), 0, buffer.position()); RadiusLog.debug("Tunnel Request:\n" + tunnelRequest.toString()); return true; }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { if (tunnelChallenge != null && in != null) { AttributeList list = tunnelChallenge.getAttributes(); list.clear(); ByteBuffer buffer = ByteBuffer.wrap(in); diameterFormat.unpackAttributes(list, buffer, buffer.limit(), false); if (tunnelAuth instanceof EAPAuthenticator && tunnelChallenge.findAttribute(Attr_EAPMessage.TYPE) == null) tunnelAuth.setupRequest(client, tunnelRequest); else tunnelAuth.processChallenge(tunnelRequest, tunnelChallenge); } else tunnelChallenge = new AccessChallenge(); ByteBuffer buffer = ByteBuffer.allocate(1500); diameterFormat.packAttributeList(tunnelRequest.getAttributes(), buffer, true); putAppBuffer(buffer.array(), 0, buffer.position()); RadiusLog.debug("Tunnel Request:\n" + tunnelRequest.toString()); return true; }
auth.setupRequest(this, p); auth.processRequest(p);
auth.setupRequest(this, p); 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); } }