/** * Negotiates the EAP Authentication Protocol to use * @param id The EAP ID * @param eapType The wanted EAP Protocol Type * @return Returns the EAP-Message */ protected byte[] negotiateEAPType(byte id, byte eapType) { return eapResponse(EAP_NAK, id, new byte[] { eapType }); }
public byte[] tlvSuccess(byte id) { byte[] b = new byte[6]; b[0] = (byte)0x80; b[1] = (byte)0x03; b[2] = (byte)0x00; b[3] = (byte)0x02; b[4] = (byte)0x00; b[5] = (byte)0x01; return eapResponse(EAP_TLV, id, b); }
/** * Negotiates the EAP Authentication Protocol to use * @param id The EAP ID * @param eapType The wanted EAP Protocol Type * @return Returns the EAP-Message */ protected byte[] negotiateEAPType(byte id, byte eapType) { return eapResponse(EAP_NAK, id, new byte[] { eapType }); }
public byte[] tlvSuccess(byte id) { byte[] b = new byte[6]; b[0] = (byte)0x80; b[1] = (byte)0x03; b[2] = (byte)0x00; b[3] = (byte)0x02; b[4] = (byte)0x00; b[5] = (byte)0x01; return eapResponse(EAP_TLV, id, b); }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { byte []out; if (in != null && in.length > 0) { out = tunnelAuth.doEAP(in); } else { out = tunnelAuth.eapResponse(EAP_IDENTITY, (byte)0, getUsername()); } putAppBuffer(out); return true; } }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { byte []out; if (in != null && in.length > 0) { out = tunnelAuth.doEAP(in); } else { out = tunnelAuth.eapResponse(EAP_IDENTITY, (byte)0, getUsername()); } putAppBuffer(out); return true; } }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { byte []out; if (in != null && in.length > 0) { out = tunnelAuth.doEAP(in); } else { out = tunnelAuth.eapResponse(EAP_IDENTITY, (byte)0, getUsername()); } putAppBuffer(out); return true; } }
return eapResponse(EAP_IDENTITY, id, getUsername()); return eapResponse(eapType, id, doEAPType(id, data, eapReply));
return eapResponse(EAP_IDENTITY, id, getUsername()); return eapResponse(eapType, id, doEAPType(id, data, eapReply));
/** * @see net.jradius.client.auth.RadiusAuthenticator#processRequest(net.jradius.packet.RadiusPacket) */ public void processRequest(RadiusPacket p) throws RadiusException { p.removeAttribute(AttributeDictionary.USER_PASSWORD); RadiusAttribute a = AttributeFactory.newAttribute(AttributeDictionary.EAP_MESSAGE, isStartWithIdentity() ? eapResponse(EAP_IDENTITY, (byte)0, getUsername()) : null, p.isRecyclable()); p.overwriteAttribute(a); }
/** * @see net.jradius.client.auth.RadiusAuthenticator#processRequest(net.jradius.packet.RadiusPacket) */ public void processRequest(RadiusPacket p) throws RadiusException { p.removeAttribute(AttributeDictionary.USER_PASSWORD); RadiusAttribute a = AttributeFactory.newAttribute(AttributeDictionary.EAP_MESSAGE, isStartWithIdentity() ? eapResponse(EAP_IDENTITY, (byte)0, getUsername()) : null, p.isRecyclable()); p.overwriteAttribute(a); }