Sha256: 7700a8357cb1cea607b695f84588e2816edcc154d5e53ad4a859c69f055b94d7
Contents?: true
Size: 702 Bytes
Versions: 7
Compression:
Stored size: 702 Bytes
Contents
require 'orange/middleware/base' module Orange::Middleware # The RadiusParser middleware will parse all outgoing content with # Radius. # # For more details on how Radius works, see http://radius.rubyforge.org/ # This middleware also loads a resource: "Orange::Radius", for the # purpose of exposing the context object. class RadiusParser < Base def init(opts = {}) @contexts = opts[:contexts] || [:live] orange.load Orange::Radius.new, :radius end # Passes packet then parses the return def packet_call(packet) pass packet orange[:radius].parse packet if @contexts.include? packet['route.context'] packet.finish end end end
Version data entries
7 entries across 7 versions & 1 rubygems