Sha256: 908366c30633b7f4e66313d8a6aaf857f3810f75417f2b8bbec399c2b47c0503
Contents?: true
Size: 1.63 KB
Versions: 3
Compression:
Stored size: 1.63 KB
Contents
module Saml class AuthnRequest include Saml::ComplexTypes::RequestAbstractType attr_accessor :xml_value tag 'AuthnRequest' attribute :force_authn, Boolean, :tag => "ForceAuthn" attribute :is_passive, Boolean, :tag => "IsPassive" attribute :assertion_consumer_service_index, Integer, :tag => "AssertionConsumerServiceIndex" attribute :assertion_consumer_service_url, String, :tag => "AssertionConsumerServiceURL" attribute :attribute_consuming_service_index, Integer, :tag => "AttributeConsumingServiceIndex" attribute :protocol_binding, String, :tag => "ProtocolBinding" attribute :provider_name, String, :tag => "ProviderName" has_one :requested_authn_context, Saml::Elements::RequestedAuthnContext has_one :scoping, Saml::Elements::Scoping has_one :name_id_policy, Saml::Elements::NameIdPolicy validates :force_authn, :inclusion => [true, false, nil] validates :assertion_consumer_service_index, :numericality => true, :if => lambda { |val| val.assertion_consumer_service_index.present? } validate :check_assertion_consumer_service def assertion_url return assertion_consumer_service_url if assertion_consumer_service_url provider.assertion_consumer_service_url(assertion_consumer_service_index) if assertion_consumer_service_index end private def check_assertion_consumer_service if assertion_consumer_service_index.present? errors.add(:assertion_consumer_service_url, :must_be_blank) if @assertion_consumer_service_url.present? errors.add(:protocol_binding, :must_be_blank) if protocol_binding.present? end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
libsaml-3.3.0 | lib/saml/authn_request.rb |
libsaml-3.2.3 | lib/saml/authn_request.rb |
libsaml-3.2.2 | lib/saml/authn_request.rb |