public class HashLockedDomainService extends Object implements LockedDomainService
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCKED_DOMAIN_REQUIRED_KEY |
static String |
LOCKED_DOMAIN_SUFFIX_KEY |
| Constructor and Description |
|---|
HashLockedDomainService(ContainerConfig config,
boolean enabled)
Create a LockedDomainService
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
gadgetCanRender(String host,
Gadget gadget,
String container)
Check whether a gadget should be allowed to render on a particular
host.
|
String |
getLockedDomainForGadget(Gadget gadget,
String container)
Calculate the locked domain for a particular gadget on a particular
container.
|
boolean |
isEnabled() |
boolean |
isSafeForOpenProxy(String host) |
void |
setLockSecurityTokens(Boolean lockSecurityTokens)
Allows a renderer to render all gadgets that require a security token on a locked
domain.
|
public static final String LOCKED_DOMAIN_REQUIRED_KEY
public static final String LOCKED_DOMAIN_SUFFIX_KEY
@Inject public HashLockedDomainService(ContainerConfig config, boolean enabled)
config - per-container configurationenabled - whether this service should do anything at all.@Inject(optional=true) public void setLockSecurityTokens(Boolean lockSecurityTokens)
lockSecurityTokens - If true, locks domains for all gadgets requiring security-token.public boolean isEnabled()
public boolean isSafeForOpenProxy(String host)
isSafeForOpenProxy in interface LockedDomainServicepublic boolean gadgetCanRender(String host, Gadget gadget, String container)
LockedDomainServicegadgetCanRender in interface LockedDomainServicehost - host name for the contentgadget - URL of the gadgetcontainer - containerpublic String getLockedDomainForGadget(Gadget gadget, String container)
LockedDomainServicegetLockedDomainForGadget in interface LockedDomainServicegadget - URL of the gadgetcontainer - name of the container pageCopyright © 2007-2012. All Rights Reserved.