info.magnolia.cms.security
Class IPSecurityManagerImpl

java.lang.Object
  extended by info.magnolia.cms.security.IPSecurityManagerImpl
All Implemented Interfaces:
IPSecurityManager

public class IPSecurityManagerImpl
extends Object
implements IPSecurityManager

A very limited implementation of IPSecurityManager. On can either limit the IP addresses (no patterns), or grant access for all IPs.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Nested Class Summary
static class IPSecurityManagerImpl.InstanceFactory
          Provides a custom transformer as the current configuration is not c2b friendly.
static class IPSecurityManagerImpl.IPSecurityManagerTransformer
          Transformer which uses the IP value of the rule as the key.
static class IPSecurityManagerImpl.Rule
          Basic rule.
 
Nested classes/interfaces inherited from interface info.magnolia.cms.security.IPSecurityManager
IPSecurityManager.Factory
 
Constructor Summary
IPSecurityManagerImpl()
           
 
Method Summary
 void addRule(String name, IPSecurityManagerImpl.Rule rule)
           
protected  IPSecurityManagerImpl.Rule getRule(String ip)
           
 Map<String,IPSecurityManagerImpl.Rule> getRules()
           
 boolean isAllowed(javax.servlet.http.HttpServletRequest req)
           
 boolean isAllowed(String ip)
           
 void setRules(Map<String,IPSecurityManagerImpl.Rule> rules)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPSecurityManagerImpl

public IPSecurityManagerImpl()
Method Detail

isAllowed

public boolean isAllowed(javax.servlet.http.HttpServletRequest req)
Specified by:
isAllowed in interface IPSecurityManager

isAllowed

public boolean isAllowed(String ip)
Specified by:
isAllowed in interface IPSecurityManager

getRule

protected IPSecurityManagerImpl.Rule getRule(String ip)

getRules

public Map<String,IPSecurityManagerImpl.Rule> getRules()

setRules

public void setRules(Map<String,IPSecurityManagerImpl.Rule> rules)

addRule

public void addRule(String name,
                    IPSecurityManagerImpl.Rule rule)


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.