Sha256: 04f6da86fdcf10a5235254c77b30d011aded82e04484f7ca12d65cfd23149abb
Contents?: true
Size: 716 Bytes
Versions: 28
Compression:
Stored size: 716 Bytes
Contents
require 'orange-core/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[:radius_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
28 entries across 28 versions & 2 rubygems