Sha256: 158721b490f4936b125a5ac19a805d82efc8cf9d47dae1636523176bd4101fec

Contents?: true

Size: 856 Bytes

Versions: 77

Compression:

Stored size: 856 Bytes

Contents

module Saml
  module Elements
    class Conditions
      include Saml::Base

      tag "Conditions"
      namespace 'saml'

      attribute :not_before, Time, :tag => "NotBefore", :on_save => lambda { |val| val.utc.xmlschema }
      attribute :not_on_or_after, Time, :tag => "NotOnOrAfter", :on_save => lambda { |val| val.utc.xmlschema }

      has_one :audience_restriction, Saml::Elements::AudienceRestriction

      def initialize(*args)
        options = args.extract_options!
        @audience_restriction = Saml::Elements::AudienceRestriction.new(:audience => options.delete(:audience)) if options[:audience]
        self.not_before       = Time.now - Saml::Config.max_issue_instant_offset.minutes
        self.not_on_or_after  = Time.now + Saml::Config.max_issue_instant_offset.minutes
        super(*(args << options))
      end

    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
libsaml-2.20.1 lib/saml/elements/conditions.rb
libsaml-2.20.0 lib/saml/elements/conditions.rb
libsaml-2.19.10 lib/saml/elements/conditions.rb
libsaml-2.19.9 lib/saml/elements/conditions.rb
libsaml-2.19.8 lib/saml/elements/conditions.rb
libsaml-2.19.7 lib/saml/elements/conditions.rb
libsaml-2.19.5 lib/saml/elements/conditions.rb
libsaml-2.19.6 lib/saml/elements/conditions.rb
libsaml-2.19.4 lib/saml/elements/conditions.rb
libsaml-2.19.3 lib/saml/elements/conditions.rb
libsaml-2.19.2 lib/saml/elements/conditions.rb
libsaml-2.19.1 lib/saml/elements/conditions.rb
libsaml-2.18.1 lib/saml/elements/conditions.rb
libsaml-2.18.0 lib/saml/elements/conditions.rb
libsaml-2.17.0 lib/saml/elements/conditions.rb
libsaml-2.16.0 lib/saml/elements/conditions.rb
libsaml-2.15.8 lib/saml/elements/conditions.rb
libsaml-2.15.7 lib/saml/elements/conditions.rb
libsaml-2.15.6 lib/saml/elements/conditions.rb
libsaml-2.15.5 lib/saml/elements/conditions.rb