Sha256: a72ca23957b329e637e79c9e87c4b6ebea20dda38ee0a324b7831c52ce6fb7d8
Contents?: true
Size: 533 Bytes
Versions: 13
Compression:
Stored size: 533 Bytes
Contents
require 'certmeister/policy' module Certmeister module Policy class ChainAll def initialize(policies) Certmeister::Policy.validate_policies(policies) @policies = policies end def authenticate(request) success = Certmeister::Policy::Response.new(true, nil) @policies.inject(success) do |continue, policy| response = policy.authenticate(request) break response unless response.authenticated? continue end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems