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
# File 'lib/saml2/endpoint.rb', line 12

def initialize(location = nil, binding = Bindings::HTTP_POST::URN)
  @location, @binding = location, 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

#==(rhs) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


18
19
20
# File 'lib/saml2/endpoint.rb', line 18

def ==(rhs)
  location == rhs.location && binding == rhs.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.



30
31
32
# File 'lib/saml2/endpoint.rb', line 30

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)


23
24
25
26
27
# File 'lib/saml2/endpoint.rb', line 23

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