mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 18:44:22 +00:00
[DS-436] SWORD Authenticator doesn't support the special groups infrastructure
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4637 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -71,6 +71,10 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
public int authenticate(Context context, String username, String password,
|
||||
String realm, HttpServletRequest request) throws SQLException
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
return BAD_ARGS;
|
||||
}
|
||||
log.info("Shibboleth login started...");
|
||||
|
||||
java.util.Enumeration names = request.getHeaderNames();
|
||||
@@ -218,7 +222,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
||||
public int[] getSpecialGroups(Context context, HttpServletRequest request)
|
||||
{
|
||||
// no user logged in or user not logged from shibboleth
|
||||
if (context.getCurrentUser() == null
|
||||
if (request == null || context.getCurrentUser() == null
|
||||
|| request.getSession().getAttribute("shib.authenticated") == null)
|
||||
{
|
||||
return new int[0];
|
||||
|
Reference in New Issue
Block a user