Sha256: c83bb3099ad2faa4823642c0fdcf0536d8d1b3edd84acb5842d7d39f49430b0b

Contents?: true

Size: 911 Bytes

Versions: 14

Compression:

Stored size: 911 Bytes

Contents

module Saml
  module Elements
    class RequestedAuthnContext

      module ComparisonTypes
        EXACT   = 'exact'
        MINIMUM = 'minimum'
        MAXIMUM = 'maximum'
        BETTER  = 'better'
        ALL     = [EXACT, MINIMUM, MAXIMUM, BETTER, nil]
      end

      include Saml::ClassRefs

      include Saml::Base

      tag 'RequestedAuthnContext'
      namespace 'samlp'

      attribute :comparison, String, tag: "Comparison"

      has_many :authn_context_class_refs, String, namespace: "saml", tag: "AuthnContextClassRef"

      validates :authn_context_class_ref, presence: true, inclusion: ALL_CLASS_REFS
      validates :comparison, inclusion: ComparisonTypes::ALL

      def authn_context_class_ref
        authn_context_class_refs.first if authn_context_class_refs
      end

      def authn_context_class_ref=(ref)
        self.authn_context_class_refs = [ref]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
libsaml-3.13.1 lib/saml/elements/requested_authn_context.rb
libsaml-3.13.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.12.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.11.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.10.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.9.3 lib/saml/elements/requested_authn_context.rb
libsaml-3.9.2 lib/saml/elements/requested_authn_context.rb
libsaml-3.9.1 lib/saml/elements/requested_authn_context.rb
libsaml-3.9.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.8.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.7.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.6.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.5.0 lib/saml/elements/requested_authn_context.rb
libsaml-3.4.0 lib/saml/elements/requested_authn_context.rb