Class: SAML2::Endpoint::Indexed::Array

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

Instance Method Summary collapse

Instance Method Details

#choose_binding(*bindings) ⇒ String

Choose a binding supported by this list of endpoints

Note that if there is a default endpoint, its binding will be preferred even over the order of the bindings passed in (as long as it is included in the list at all).

Returns:

  • (String)


46
47
48
49
50
# File 'lib/saml2/endpoint.rb', line 46

def choose_binding(*bindings)
  return default.binding if default && bindings.include?(default.binding)

  super
end

#choose_endpoint(binding) ⇒ Endpoint?

Choose an endpoint from this list of endpoints that supports a given binding

Note that if there is a default endpoint, it will be returned if its binding matches even over earlier endpoints in the list.

Parameters:

  • binding (String)

    the binding that must match

Returns:



58
59
60
61
62
# File 'lib/saml2/endpoint.rb', line 58

def choose_endpoint(binding)
  return default if default && default.binding == binding

  super
end