class SAML2::IdentityProvider

Attributes

attribute_profiles[W]
attributes[W]
single_sign_on_services[W]
want_authn_requests_signed[W]

@return [Boolean, nil]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/saml2/identity_provider.rb, line 12
def initialize
  super
  @want_authn_requests_signed = nil
  @single_sign_on_services = []
  @attribute_profiles = []
  @attributes = []
end

Public Instance Methods

attribute_profiles() click to toggle source

@return [Array<String>]

# File lib/saml2/identity_provider.rb, line 43
def attribute_profiles
  @attribute_profiles ||= load_string_array(xml, "md:AttributeProfile")
end
attributes() click to toggle source

@return [Array<Attribute>]

# File lib/saml2/identity_provider.rb, line 48
def attributes
  @attributes ||= load_object_array(xml, "saml:Attribute", Attribute)
end
build(builder) click to toggle source

(see Base#build)

Calls superclass method
# File lib/saml2/identity_provider.rb, line 53
def build(builder)
  builder["md"].IDPSSODescriptor do |idp_sso_descriptor|
    super(idp_sso_descriptor)

    unless want_authn_requests_signed?.nil?
      idp_sso_descriptor.parent["WantAuthnRequestsSigned"] =
        want_authn_requests_signed?
    end

    single_sign_on_services.each do |sso|
      sso.build(idp_sso_descriptor, "SingleSignOnService")
    end

    attribute_profiles.each do |ap|
      idp_sso_descriptor["md"].AttributeProfile(ap)
    end

    attributes.each do |attr|
      attr.build(idp_sso_descriptor)
    end
  end
end
from_xml(node) click to toggle source

(see Base#from_xml)

Calls superclass method
# File lib/saml2/identity_provider.rb, line 21
def from_xml(node)
  super
  remove_instance_variable(:@want_authn_requests_signed)
  @single_sign_on_services = nil
  @attribute_profiles = nil
  @attributes = nil
end
single_sign_on_services() click to toggle source

@return [Array<Endpoint>]

# File lib/saml2/identity_provider.rb, line 38
def single_sign_on_services
  @single_sign_on_services ||= load_object_array(xml, "md:SingleSignOnService", Endpoint)
end
want_authn_requests_signed?() click to toggle source

@return [Boolean, nil]

# File lib/saml2/identity_provider.rb, line 30
def want_authn_requests_signed?
  unless instance_variable_defined?(:@want_authn_requests_signed)
    @want_authn_requests_signed = xml["WantAuthnRequestsSigned"] && xml["WantAuthnRequestsSigned"] == "true"
  end
  @want_authn_requests_signed
end