public class UserIpLimitsAccessVoter extends Object implements org.springframework.security.access.AccessDecisionVoter
| Constructor and Description |
|---|
UserIpLimitsAccessVoter() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getUserIpLimits(org.springframework.security.core.Authentication auth)
Retrieves the ip limits defined for a given user
|
protected boolean |
ipInRange(String ipAddress,
String range)
Determines if a given IP address is in the given IP range.
|
boolean |
supports(Class aClass)
This methods returns true if the arg class is an instance of or
subclass of FilterInvocation.
|
boolean |
supports(org.springframework.security.access.ConfigAttribute configAttribute)
This method always returns true because all configAttributes are able
to be handled by this voter.
|
int |
vote(org.springframework.security.core.Authentication auth,
Object resource,
Collection config)
This method checks the IP limits of the principal and denys access if
those limits exist and the request is coming from outside the specified
range.
|
public boolean supports(org.springframework.security.access.ConfigAttribute configAttribute)
supports in interface org.springframework.security.access.AccessDecisionVoterconfigAttribute - any attpublic boolean supports(Class aClass)
supports in interface org.springframework.security.access.AccessDecisionVoteraClass - to be analyized for an AuthZ vote.public int vote(org.springframework.security.core.Authentication auth,
Object resource,
Collection config)
vote in interface org.springframework.security.access.AccessDecisionVoterauth - principal seeking AuthZresource - that is under protectionconfig - access-attributes defined on resourceprotected String getUserIpLimits(org.springframework.security.core.Authentication auth)
auth - Authentication where user details can be foundCopyright © 2009–2017 DuraSpace. All rights reserved.