Class: SAML2::Endpoint

Inherits:
Base
  • Object
show all
Defined in:
lib/saml2/endpoint.rb

Direct Known Subclasses

Indexed

Defined Under Namespace

Classes: Indexed

Instance Attribute Summary collapse

Attributes inherited from Base

#xml

Instance Method Summary collapse

Methods inherited from Base

#decrypt, from_xml, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml

Constructor Details

#initialize(location = nil, binding = Bindings::HTTP_POST::URN) ⇒ Endpoint

Returns a new instance of Endpoint.

Parameters:

  • location (String) (defaults to: nil)
  • binding (String) (defaults to: Bindings::HTTP_POST::URN)


12
13
14
15
16
# File 'lib/saml2/endpoint.rb', line 12

def initialize(location = nil, binding = Bindings::HTTP_POST::URN)
  super()
  @location = location
  @binding = binding
end

Instance Attribute Details

#bindingString (readonly)

Returns:

  • (String)


8
9
10
# File 'lib/saml2/endpoint.rb', line 8

def binding
  @binding
end

#locationString (readonly)

Returns:

  • (String)


8
9
10
# File 'lib/saml2/endpoint.rb', line 8

def location
  @location
end

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


20
21
22
# File 'lib/saml2/endpoint.rb', line 20

def ==(other)
  location == other.location && binding == other.binding
end

#build(builder, element) ⇒ void

This method returns an undefined value.

Serialize this object to XML, as part of a larger document

Parameters:

  • builder (Nokogiri::XML::Builder)

    The builder helper object to serialize to.



32
33
34
# File 'lib/saml2/endpoint.rb', line 32

def build(builder, element)
  builder["md"].__send__(element, "Location" => location, "Binding" => binding)
end

#from_xml(node) ⇒ void

This method returns an undefined value.

Parse an XML element into this object.

Parameters:

  • node (Nokogiri::XML::Element)


25
26
27
28
29
# File 'lib/saml2/endpoint.rb', line 25

def from_xml(node)
  super
  @location = node["Location"]
  @binding = node["Binding"]
end