Sha256: c3c822dee84cfd2992b2dc3d38c33311a920c24926bfa8a5ba41c1329718bc87

Contents?: true

Size: 485 Bytes

Versions: 9

Compression:

Stored size: 485 Bytes

Contents

module Certmeister

  module Policy

    def self.validate_authenticate_signature(policy)
      policy and policy.respond_to?(:authenticate) and policy.method(:authenticate).arity == 1
    end

    def self.validate_authenticate_returns_response(policy)
      response = policy.authenticate({})
      response.respond_to?(:authenticated?) and response.respond_to?(:error)
    end

  end

end

Dir.glob(File.join(File.dirname(__FILE__), "policy", "*.rb")) do |path|
  require path
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
certmeister-0.3.2 lib/certmeister/policy.rb
certmeister-0.3.1 lib/certmeister/policy.rb
certmeister-0.3.0 lib/certmeister/policy.rb
certmeister-0.2.3 lib/certmeister/policy.rb
certmeister-0.2.1 lib/certmeister/policy.rb
certmeister-0.2.0 lib/certmeister/policy.rb
certmeister-0.1.0 lib/certmeister/policy.rb
certmeister-0.0.2 lib/certmeister/policy.rb
certmeister-0.0.1 lib/certmeister/policy.rb