public class MetadataQueryProtocolRequestURLBuilder extends Object implements com.google.common.base.Function<net.shibboleth.utilities.java.support.resolver.CriteriaSet,String>
Support for building request URLs per the MDQ SAML profile based on an EntityIdCriterion is built-in.
Support for building request URLs via other criteria may be specified via ordered instances
of MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder. These are evaluated in the supplied order,
and the first non-null result will be returned.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder
Interface for a component which builds a Metadata Query Protocol request URL from a base URL
and criteria.
|
| Modifier and Type | Field and Description |
|---|---|
private String |
base
The request base URL per the specification.
|
private Logger |
log
Logger.
|
private com.google.common.escape.Escaper |
pathEscaper
Path escaper for escaping the input value inserted into the URL path.
|
private com.google.common.base.Function<String,String> |
transformer
Function which transforms the entityID prior to substitution into the URL.
|
private List<MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder> |
urlBuilders
List of secondary URL builders.
|
| Constructor and Description |
|---|
MetadataQueryProtocolRequestURLBuilder(String baseURL)
Constructor.
|
MetadataQueryProtocolRequestURLBuilder(String baseURL,
com.google.common.base.Function<String,String> transform)
Constructor.
|
MetadataQueryProtocolRequestURLBuilder(String baseURL,
com.google.common.base.Function<String,String> transform,
List<MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder> secondaryURLBuilders)
Constructor.
|
MetadataQueryProtocolRequestURLBuilder(String baseURL,
List<MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder> secondaryURLBuilders)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
apply(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) |
private String |
buildFromEntityID(String inputEntityID)
Build request URL from entityID.
|
private String |
buildFromSecondaryLookups(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
Build request URL from secondary lookup criteria.
|
private final Logger log
private String base
private com.google.common.base.Function<String,String> transformer
private com.google.common.escape.Escaper pathEscaper
private List<MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder> urlBuilders
public MetadataQueryProtocolRequestURLBuilder(@ParameterName(name="baseURL")@Nonnull@NotEmpty String baseURL)
baseURL - the base URL for the metadata responderpublic MetadataQueryProtocolRequestURLBuilder(@ParameterName(name="baseURL")@Nonnull@NotEmpty String baseURL, @ParameterName(name="transform")@Nullable com.google.common.base.Function<String,String> transform)
baseURL - the base URL for the metadata respondertransform - function which transforms the entityID prior to URL construction substitution, may be nullpublic MetadataQueryProtocolRequestURLBuilder(@ParameterName(name="baseURL")@Nonnull@NotEmpty String baseURL, @ParameterName(name="secondaryURLBuilders")@Nullable List<MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder> secondaryURLBuilders)
baseURL - the base URL for the metadata respondersecondaryURLBuilders - the list of secondary URL builders, may be nullpublic MetadataQueryProtocolRequestURLBuilder(@ParameterName(name="baseURL")@Nonnull@NotEmpty String baseURL, @ParameterName(name="transform")@Nullable com.google.common.base.Function<String,String> transform, @ParameterName(name="secondaryURLBuilders")@Nullable List<MetadataQueryProtocolRequestURLBuilder.MetadataQueryProtocolURLBuilder> secondaryURLBuilders)
baseURL - the base URL for the metadata respondertransform - function which transforms the entityID prior to URL construction substitution, may be nullsecondaryURLBuilders - the list of secondary URL builders, may be null@Nullable public String apply(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
apply in interface com.google.common.base.Function<net.shibboleth.utilities.java.support.resolver.CriteriaSet,String>private String buildFromEntityID(@Nonnull String inputEntityID)
inputEntityID - the entityIDCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.