Sha256: edd954833b172812fc6cf1db542f7c0cc339c0135dd31c71167136947914b14f
Contents?: true
Size: 707 Bytes
Versions: 10
Compression:
Stored size: 707 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[: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
10 entries across 10 versions & 1 rubygems