public class HashLockedDomainService extends AbstractLockedDomainService
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCKED_DOMAIN_SUFFIX_KEY |
LOCKED_DOMAIN_FEATURE, LOCKED_DOMAIN_REQUIRED_KEY, PERMITTED_REFERER_DOMAINS_KEY, permittedRefererDomains, required| Constructor and Description |
|---|
HashLockedDomainService(ContainerConfig config,
boolean enabled,
LockedDomainPrefixGenerator ldGen)
Create a LockedDomainService
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLockedDomainForGadget(Gadget gadget,
String container)
Calculate the locked domain for a particular gadget on a particular
container.
|
boolean |
isGadgetValidForHost(String host,
Gadget gadget,
String container)
Check whether a gadget should be allowed to render on a particular
host.
|
boolean |
isHostUsingLockedDomain(String host)
Check whether a host is using a locked domain.
|
void |
setAuthority(Authority authority) |
isDomainLockingEnforced, isEnabled, isExcludedFromLockedDomain, isGadgetReqestingLocking, isRefererCheckEnabled, isSafeForOpenProxy, isValidReferer, setLockSecurityTokens, setRefererCheckEnabledpublic static final String LOCKED_DOMAIN_SUFFIX_KEY
@Inject public HashLockedDomainService(ContainerConfig config, boolean enabled, LockedDomainPrefixGenerator ldGen)
config - per-container configurationenabled - whether this service should do anything at all.public String getLockedDomainForGadget(Gadget gadget, String container) throws GadgetException
LockedDomainServicegetLockedDomainForGadget in interface LockedDomainServicegetLockedDomainForGadget in class AbstractLockedDomainServicegadget - URL of the gadgetcontainer - name of the container pageGadgetExceptionpublic boolean isGadgetValidForHost(String host, Gadget gadget, String container)
LockedDomainServiceisGadgetValidForHost in interface LockedDomainServiceisGadgetValidForHost in class AbstractLockedDomainServicehost - host name for the contentgadget - URL of the gadgetcontainer - containerpublic boolean isHostUsingLockedDomain(String host)
LockedDomainServiceisHostUsingLockedDomain in interface LockedDomainServiceisHostUsingLockedDomain in class AbstractLockedDomainServicehost - Host to inspect for locked domain suffix.@Inject(optional=true) public void setAuthority(Authority authority)
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.