org.opensaml.common.binding
Class BasicEndpointSelector
java.lang.Object
org.opensaml.common.binding.AbstractEndpointSelector
org.opensaml.common.binding.BasicEndpointSelector
- Direct Known Subclasses:
- AuthnResponseEndpointSelector
public class BasicEndpointSelector
- extends AbstractEndpointSelector
This endpoint selector retrieves all the endpoints for a given role. A first filter pass removes those endpoints that
use bindings which are not supported by the issuer. If the remaining endpoints are not IndexedEndpoint
s the
first endpoint in the list is returned. If the remaining endpoints are IndexedEndpoint
s the first endpoint
with the isDefault attribute set to true is returned, if no isDefault attribute is set to true the first endpoint to
ommit this attribute is returned, and if all the endpoints have the isDefault attribute set to false then the first
endpoint in the list is returned.
Prior to selecting the endpoint the following fields must have had values set: entity role,
endpoint type, issuer supported bindings.
While this algorithm with work for selecting the endpoint for responses to AuthnRequest
s the SAML
specification does stipulate additional endpoint selection criteria and as such the use of an endpoint selector
specifically meant to handler this situation should be used, for example: AuthnResponseEndpointSelector
.
Methods inherited from class org.opensaml.common.binding.AbstractEndpointSelector |
getEndpointType, getMetadataProvider, getRelyingParty, getRelyingPartyRole, getSamlRequest, getSamlResponse, getSupportedIssuerBindings, setEndpointType, setMetadataProvider, setRelyingParty, setRelyingPartyRole, setSamlRequest, setSamlResponse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicEndpointSelector
public BasicEndpointSelector()
selectEndpoint
public Endpoint selectEndpoint()
- Selects the endpoint to which messages should be sent.
- Specified by:
selectEndpoint
in class AbstractEndpointSelector
- Returns:
- endpoint to which messages should be sent, or null if no suitable endpoint can be determined
selectIndexedEndpoint
protected Endpoint selectIndexedEndpoint(java.util.List<IndexedEndpoint> endpoints)
- Selects an appropriate endpoint from a list of indexed endpoints.
- Parameters:
endpoints
- list of indexed endpoints
- Returns:
- appropriate endpoint from a list of indexed endpoints or null
selectNonIndexedEndpoint
protected Endpoint selectNonIndexedEndpoint(java.util.List<Endpoint> endpoints)
- Selects an appropriate endpoint from a list of non-indexed endpoints.
- Parameters:
endpoints
- list of non-indexed endpoints
- Returns:
- appropriate endpoint from a list of non-indexed endpoints or null