Sha256: a87cb27719d6c5696464e4ccff5b8e54bb008a88913749ce2ad13a6800180597

Contents?: true

Size: 1.1 KB

Versions: 41

Compression:

Stored size: 1.1 KB

Contents

module Saml
  module Elements
    class Subject
      include Saml::Base

      tag "Subject"
      register_namespace 'saml', Saml::SAML_NAMESPACE
      namespace 'saml'

      element :_name_id, NameId, :tag => "NameID"

      has_many :subject_confirmation, Saml::Elements::SubjectConfirmation

      validates :name_id, :subject_confirmation, :presence => true

      def initialize(*args)
        options               = args.extract_options!
        @_name_id             = Saml::Elements::NameId.new(format: options.delete(:name_id_format),
                                                           value:  options.delete(:name_id))
        @subject_confirmation = Saml::Elements::SubjectConfirmation.new(recipient:      options.delete(:recipient),
                                                                        in_response_to: options.delete(:in_response_to))
        super(*(args << options))
      end

      def name_id
        @_name_id.value
      end

      def name_id=(value)
        @_name_id.value = value
      end

      def name_id_format
        @_name_id.format
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
libsaml-2.10.2 lib/saml/elements/subject.rb
libsaml-2.10.1 lib/saml/elements/subject.rb
libsaml-2.10.0 lib/saml/elements/subject.rb
libsaml-2.9.0 lib/saml/elements/subject.rb
libsaml-2.8.1 lib/saml/elements/subject.rb
libsaml-2.8.0 lib/saml/elements/subject.rb
libsaml-2.7.0 lib/saml/elements/subject.rb
libsaml-2.6.9 lib/saml/elements/subject.rb
libsaml-2.6.8 lib/saml/elements/subject.rb
libsaml-2.6.7 lib/saml/elements/subject.rb
libsaml-2.6.6 lib/saml/elements/subject.rb
libsaml-2.6.4 lib/saml/elements/subject.rb
libsaml-2.6.2 lib/saml/elements/subject.rb
libsaml-2.6.1 lib/saml/elements/subject.rb
libsaml-2.6.0 lib/saml/elements/subject.rb
libsaml-2.5.2 lib/saml/elements/subject.rb
libsaml-2.5.1 lib/saml/elements/subject.rb
libsaml-2.5.0 lib/saml/elements/subject.rb
libsaml-2.4.7 lib/saml/elements/subject.rb
libsaml-2.4.6 lib/saml/elements/subject.rb