mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
New modules/authentication-ip.cfg
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6569 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -78,19 +78,18 @@ public class IPAuthentication implements AuthenticationMethod
|
||||
ipMatcherGroupIDs = new HashMap<IPMatcher, Integer>();
|
||||
ipMatcherGroupNames = new HashMap<IPMatcher, String>();
|
||||
|
||||
Enumeration e = ConfigurationManager.propertyNames();
|
||||
Enumeration e = ConfigurationManager.propertyNames("authentication-ip");
|
||||
|
||||
while (e.hasMoreElements())
|
||||
{
|
||||
String propName = (String) e.nextElement();
|
||||
if (propName.startsWith("authentication.ip."))
|
||||
if (propName.startsWith("ip."))
|
||||
{
|
||||
String[] nameParts = propName.split("\\.");
|
||||
|
||||
if (nameParts.length == 3)
|
||||
{
|
||||
addMatchers(nameParts[2], ConfigurationManager
|
||||
.getProperty(propName));
|
||||
addMatchers(nameParts[2], ConfigurationManager.getProperty("authentication-ip", propName));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -0,0 +1,14 @@
|
||||
#### Example of configuring IP-based authentication
|
||||
#### (to use, add org.dspace.authenticate.IPAuthentication to auth stack above)
|
||||
#
|
||||
# authentication.ip.GROUPNAME = iprange[, iprange ...]
|
||||
#
|
||||
# Note if the Groupname contains blanks you must escape it,
|
||||
# e.g. Department\ of\ Statistics
|
||||
#
|
||||
# Full, partial IPs; network/netmask; network/CIDR
|
||||
#
|
||||
#ip.MY_UNIVERSITY = 10.1.2.3, \
|
||||
# 13.5, \
|
||||
# 11.3.4.5/24, \
|
||||
# 12.7.8.9/255.255.128.0
|
14
dspace/config/modules/authentication-ip.cfg
Normal file
14
dspace/config/modules/authentication-ip.cfg
Normal file
@@ -0,0 +1,14 @@
|
||||
#### Example of configuring IP-based authentication
|
||||
#### (to use, add org.dspace.authenticate.IPAuthentication to auth stack above)
|
||||
#
|
||||
# authentication.ip.GROUPNAME = iprange[, iprange ...]
|
||||
#
|
||||
# Note if the Groupname contains blanks you must escape it,
|
||||
# e.g. Department\ of\ Statistics
|
||||
#
|
||||
# Full, partial IPs; network/netmask; network/CIDR
|
||||
#
|
||||
#ip.MY_UNIVERSITY = 10.1.2.3, \
|
||||
# 13.5, \
|
||||
# 11.3.4.5/24, \
|
||||
# 12.7.8.9/255.255.128.0
|
Reference in New Issue
Block a user