mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 02:24:18 +00:00
[DS-48] shibboleth+dspace1.5.1 patch - ID: 2412723 Commiting dspace3688-ignoreScope-v3.patch (3 kB)
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3713 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -226,6 +226,8 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
java.util.Set groups = new java.util.HashSet();
|
||||
String roleHeader = ConfigurationManager
|
||||
.getProperty("authentication.shib.role-header");
|
||||
boolean roleHeader_ignoreScope = ConfigurationManager
|
||||
.getBooleanProperty("authentication.shib.role-header.ignore-scope");
|
||||
if (roleHeader == null || roleHeader.trim().length() == 0)
|
||||
roleHeader = "Shib-EP-UnscopedAffiliation"; // fall back to default
|
||||
String affiliations = request.getHeader(roleHeader);
|
||||
@@ -251,6 +253,13 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
{
|
||||
String affiliation = st.nextToken().trim();
|
||||
|
||||
// strip scope if present and roleHeader_ignoreScope
|
||||
if (roleHeader_ignoreScope)
|
||||
{
|
||||
int index = affiliation.indexOf("@");
|
||||
if (index != -1) affiliation = affiliation.substring(0,index);
|
||||
}
|
||||
|
||||
// perform mapping here if necessary
|
||||
String groupLabels = ConfigurationManager
|
||||
.getProperty("authentication.shib.role." + affiliation);
|
||||
|
Reference in New Issue
Block a user