Class ValidGotoUrlExtractor
- java.lang.Object
-
- org.forgerock.openam.security.whitelist.ValidGotoUrlExtractor
-
- All Implemented Interfaces:
ValidDomainExtractor<String>
public class ValidGotoUrlExtractor extends Object implements ValidDomainExtractor<String>
Extracts the valid goto URL domains from the Authentication service configuration and caches the result. If the configuration changes, a service listener should clear the corresponding cache entry resulting in a config reload.Per
ValidDomainExtractor.extractValidDomains(Object)an empty collection means the realm was read and has no resources in its Validation Service - what a fresh installation looks like - whilenullmeans the configuration store could not be reached, so nothing is known about what the realm allows.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>extractValidDomains(String realm)Extracts the Valid goto URL domains based on the provided configuration details.static ValidDomainExtractor<String>getInstance()protected Set<String>getValidGotoUrlPatterns(String realm)
-
-
-
Method Detail
-
getInstance
public static ValidDomainExtractor<String> getInstance()
-
extractValidDomains
public Collection<String> extractValidDomains(String realm)
Description copied from interface:ValidDomainExtractorExtracts the Valid goto URL domains based on the provided configuration details.An empty collection and
nullare two different answers, andFailSafeRedirectUrlValidatortells them apart:- an empty collection means the configuration was read and holds no URL patterns, which is what a realm or entity that was never configured looks like;
nullmeans the configuration could not be read at all - the store is unreachable, or the caller did not say which configuration to read - so nothing is known about the patterns. Callers that fail safe refuse to redirect off this server in that case, whatever they make of an empty list.
RedirectUrlValidator, which fails open, treats the two the same.- Specified by:
extractValidDomainsin interfaceValidDomainExtractor<String>- Parameters:
realm- The necessary information to retrieve the correct configuration.- Returns:
- The collection of valid goto URL domains based on the provided configuration information. Empty when
none are configured,
nullwhen they could not be read.
-
getValidGotoUrlPatterns
protected Set<String> getValidGotoUrlPatterns(String realm) throws SMSException
- Throws:
SMSException
-
-