Class UrlResourceMetadataResolver
- java.lang.Object
-
- org.apereo.cas.support.saml.services.idp.metadata.cache.resolver.BaseSamlRegisteredServiceMetadataResolver
-
- org.apereo.cas.support.saml.services.idp.metadata.cache.resolver.UrlResourceMetadataResolver
-
- All Implemented Interfaces:
SamlRegisteredServiceMetadataResolver
- Direct Known Subclasses:
MetadataQueryProtocolMetadataResolver
public class UrlResourceMetadataResolver extends BaseSamlRegisteredServiceMetadataResolver
This isUrlResourceMetadataResolver.- Since:
- 5.2.0
-
-
Field Summary
-
Fields inherited from class org.apereo.cas.support.saml.services.idp.metadata.cache.resolver.BaseSamlRegisteredServiceMetadataResolver
configBean, samlIdPProperties
-
-
Constructor Summary
Constructors Constructor Description UrlResourceMetadataResolver(org.apereo.cas.util.http.HttpClient httpClient, org.apereo.cas.configuration.model.support.saml.idp.SamlIdPProperties samlIdPProperties, org.apereo.cas.support.saml.OpenSamlConfigBean configBean)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.http.HttpResponsefetchMetadata(org.apereo.cas.support.saml.services.SamlRegisteredService service, java.lang.String metadataLocation, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet, java.io.File backupFile)Fetch metadata http response.protected java.lang.StringgetBackupMetadataFilenamePrefix(org.springframework.core.io.AbstractResource metadataResource, org.apereo.cas.support.saml.services.SamlRegisteredService service)Gets backup metadata filename prefix.protected java.io.FilegetMetadataBackupFile(org.springframework.core.io.AbstractResource metadataResource, org.apereo.cas.support.saml.services.SamlRegisteredService service)Gets metadata backup file.protected java.lang.StringgetMetadataLocationForService(org.apereo.cas.support.saml.services.SamlRegisteredService service, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)Gets metadata location for service.protected org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolvergetMetadataResolverFromResponse(org.apache.http.HttpResponse response, java.io.File backupFile)Gets metadata resolver from response.booleanisAvailable(org.apereo.cas.support.saml.services.SamlRegisteredService service)Is the resolver available and able to resolve metadata? This method may contact the metadata source checking for the source availability.java.util.Collection<? extends org.opensaml.saml.metadata.resolver.MetadataResolver>resolve(org.apereo.cas.support.saml.services.SamlRegisteredService service, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)Resolve list.protected booleanshouldHttpResponseStatusBeProcessed(org.springframework.http.HttpStatus status)Should http response status be processed?booleansupports(org.apereo.cas.support.saml.services.SamlRegisteredService service)Supports this service?-
Methods inherited from class org.apereo.cas.support.saml.services.idp.metadata.cache.resolver.BaseSamlRegisteredServiceMetadataResolver
addMetadataFiltersToMetadataResolver, buildMetadataFilters, buildMetadataResolverFrom, buildRequiredValidUntilFilterIfNeeded, buildSignatureValidationFilterIfNeeded, buildSignatureValidationFilterIfNeeded, buildSignatureValidationFilterIfNeeded, configureAndInitializeSingleMetadataResolver, configureAndInitializeSingleMetadataResolver
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apereo.cas.support.saml.services.idp.metadata.cache.resolver.SamlRegisteredServiceMetadataResolver
getName, resolve, saveOrUpdate
-
-
-
-
Method Detail
-
resolve
public java.util.Collection<? extends org.opensaml.saml.metadata.resolver.MetadataResolver> resolve(org.apereo.cas.support.saml.services.SamlRegisteredService service, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)Description copied from interface:SamlRegisteredServiceMetadataResolverResolve list.- Parameters:
service- the servicecriteriaSet- the criteria set- Returns:
- the list
-
supports
public boolean supports(org.apereo.cas.support.saml.services.SamlRegisteredService service)
Description copied from interface:SamlRegisteredServiceMetadataResolverSupports this service?- Parameters:
service- the service- Returns:
- true/false
-
isAvailable
public boolean isAvailable(org.apereo.cas.support.saml.services.SamlRegisteredService service)
Description copied from interface:SamlRegisteredServiceMetadataResolverIs the resolver available and able to resolve metadata? This method may contact the metadata source checking for the source availability.- Parameters:
service- the service- Returns:
- true /false
-
shouldHttpResponseStatusBeProcessed
protected boolean shouldHttpResponseStatusBeProcessed(org.springframework.http.HttpStatus status)
Should http response status be processed?- Parameters:
status- the status- Returns:
- true /false
-
getMetadataResolverFromResponse
protected org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver getMetadataResolverFromResponse(org.apache.http.HttpResponse response, java.io.File backupFile) throws java.lang.ExceptionGets metadata resolver from response.- Parameters:
response- the responsebackupFile- the backup file- Returns:
- the metadata resolver from response
- Throws:
java.lang.Exception- the exception
-
fetchMetadata
protected org.apache.http.HttpResponse fetchMetadata(org.apereo.cas.support.saml.services.SamlRegisteredService service, java.lang.String metadataLocation, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet, java.io.File backupFile)Fetch metadata http response.- Parameters:
service- the servicemetadataLocation- the metadata locationcriteriaSet- the criteria setbackupFile- the backup file- Returns:
- the http response
-
getMetadataLocationForService
protected java.lang.String getMetadataLocationForService(org.apereo.cas.support.saml.services.SamlRegisteredService service, net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)Gets metadata location for service.- Parameters:
service- the servicecriteriaSet- the criteria set- Returns:
- the metadata location for service
-
getMetadataBackupFile
protected java.io.File getMetadataBackupFile(org.springframework.core.io.AbstractResource metadataResource, org.apereo.cas.support.saml.services.SamlRegisteredService service) throws java.io.IOExceptionGets metadata backup file.- Parameters:
metadataResource- the metadata resourceservice- the service- Returns:
- the metadata backup file
- Throws:
java.io.IOException- the io exception
-
getBackupMetadataFilenamePrefix
protected java.lang.String getBackupMetadataFilenamePrefix(org.springframework.core.io.AbstractResource metadataResource, org.apereo.cas.support.saml.services.SamlRegisteredService service)Gets backup metadata filename prefix.The metadata source may be an aggregate, representing more than on entity id inside the single registered service definition. Therefor, using the service's name or id may not be appropriate choice as compounds in the metadata file name.
- Parameters:
metadataResource- the metadata resourceservice- the service- Returns:
- the backup metadata filename prefix
-
-