Class: SAML2::Endpoint
Direct Known Subclasses
Defined Under Namespace
Modules: ChoiceHelpers Classes: Array, Indexed
Instance Attribute Summary collapse
Attributes inherited from Base
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#build(builder, element) ⇒ void
Serialize this object to XML, as part of a larger document.
-
#effective_response_location ⇒ String
@!attribute The #response_location if there is one, otherwise the #location.
-
#from_xml(node) ⇒ void
Parse an XML element into this object.
-
#initialize(location = nil, binding = Bindings::HTTP_POST::URN, response_location = nil) ⇒ Endpoint
constructor
A new instance of Endpoint.
- #inspect ⇒ String
Methods inherited from Base
#decrypt, from_xml, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize(location = nil, binding = Bindings::HTTP_POST::URN, response_location = nil) ⇒ Endpoint
Returns a new instance of Endpoint.
101 102 103 104 105 106 |
# File 'lib/saml2/endpoint.rb', line 101 def initialize(location = nil, binding = Bindings::HTTP_POST::URN, response_location = nil) super() @location = location @binding = binding @response_location = response_location end |
Instance Attribute Details
#binding ⇒ String
94 95 96 |
# File 'lib/saml2/endpoint.rb', line 94 def binding @binding end |
#location ⇒ String
94 95 96 |
# File 'lib/saml2/endpoint.rb', line 94 def location @location end |
#response_location ⇒ String?
96 97 98 |
# File 'lib/saml2/endpoint.rb', line 96 def response_location @response_location end |
Instance Method Details
#==(other) ⇒ Boolean
110 111 112 113 |
# File 'lib/saml2/endpoint.rb', line 110 def ==(other) other.is_a?(Endpoint) && location == other.location && binding == other.binding && response_location == other.response_location end |
#build(builder, element) ⇒ void
This method returns an undefined value.
Serialize this object to XML, as part of a larger document
124 125 126 127 128 |
# File 'lib/saml2/endpoint.rb', line 124 def build(builder, element) builder["md"].__send__(element, "Location" => location, "Binding" => binding) do |b| b.ResponseLocation = response_location if response_location end end |
#effective_response_location ⇒ String
@!attribute The #response_location if there is one, otherwise the #location
133 134 135 |
# File 'lib/saml2/endpoint.rb', line 133 def effective_response_location response_location || location end |
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
116 117 118 119 120 121 |
# File 'lib/saml2/endpoint.rb', line 116 def from_xml(node) super @location = node["Location"] @binding = node["Binding"] @response_location = node["ResponseLocation"] end |
#inspect ⇒ String
138 139 140 |
# File 'lib/saml2/endpoint.rb', line 138 def inspect "#<SAML2::Endpoint #{endpoint_inspect}>" end |