|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.authenticate.ShibAuthentication
public class ShibAuthentication
Shibboleth authentication for DSpace, tested on Shibboleth 1.3.x and Shibboleth 2.x. Read Shib DSpace 1.5 for installation procedure. Read dspace.cfg for details on options available.
| Field Summary |
|---|
| Fields inherited from interface org.dspace.authenticate.AuthenticationMethod |
|---|
BAD_ARGS, BAD_CREDENTIALS, CERT_REQUIRED, NO_SUCH_USER, SUCCESS |
| Constructor Summary | |
|---|---|
ShibAuthentication()
|
|
| Method Summary | |
|---|---|
boolean |
allowSetPassword(Context context,
javax.servlet.http.HttpServletRequest request,
String email)
Indicate whether or not a particular self-registering user can set themselves a password in the profile info form. |
int |
authenticate(Context context,
String username,
String password,
String realm,
javax.servlet.http.HttpServletRequest request)
Authenticate the given or implicit credentials. |
boolean |
canSelfRegister(Context context,
javax.servlet.http.HttpServletRequest request,
String username)
Indicate whether or not a particular user can self-register, based on e-mail address. |
int[] |
getSpecialGroups(Context context,
javax.servlet.http.HttpServletRequest request)
Grab the special groups to be automatically provisioned for the current user. |
void |
initEPerson(Context context,
javax.servlet.http.HttpServletRequest request,
EPerson eperson)
Initialise a new e-person record for a self-registered new user. |
boolean |
isImplicit()
Predicate, is this an implicit authentication method. |
String |
loginPageTitle(Context context)
Get title of login page to which to redirect. |
String |
loginPageURL(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get login page to which to redirect. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShibAuthentication()
| Method Detail |
|---|
public int authenticate(Context context,
String username,
String password,
String realm,
javax.servlet.http.HttpServletRequest request)
throws SQLException
AuthenticationMethodEPerson. If an EPerson is found it is
set in the Context that was passed.
authenticate in interface AuthenticationMethodcontext - DSpace context, will be modified (ePerson set) upon success.username - Username (or email address) when method is explicit. Use null for
implicit method.password - Password for explicit auth, or null for implicit method.realm - Realm is an extra parameter used by some authentication methods, leave null if
not applicable.request - The HTTP request that started this operation, or null if not applicable.
Meaning:
SUCCESS - authenticated OK.
BAD_CREDENTIALS - user exists, but credentials (e.g. passwd) don't match
CERT_REQUIRED - not allowed to login this way without X.509 cert.
NO_SUCH_USER - user not found using this method.
BAD_ARGS - user/pw not appropriate for this method
SQLException
public int[] getSpecialGroups(Context context,
javax.servlet.http.HttpServletRequest request)
getSpecialGroups in interface AuthenticationMethodcontext - A valid DSpace context.request - The request that started this operation, or null if not applicable.
null.
public boolean allowSetPassword(Context context,
javax.servlet.http.HttpServletRequest request,
String email)
throws SQLException
allowSetPassword in interface AuthenticationMethodcontext - DSpace contextrequest - HTTP request, in case anything in that is used to decideemail - e-mail address of user attempting to register
SQLExceptionpublic boolean isImplicit()
isImplicit in interface AuthenticationMethod
public boolean canSelfRegister(Context context,
javax.servlet.http.HttpServletRequest request,
String username)
throws SQLException
canSelfRegister in interface AuthenticationMethodcontext - DSpace contextrequest - HTTP request, in case anything in that is used to decideemail - e-mail address of user attempting to register
SQLException
public void initEPerson(Context context,
javax.servlet.http.HttpServletRequest request,
EPerson eperson)
throws SQLException
initEPerson in interface AuthenticationMethodcontext - DSpace contextrequest - HTTP request, in case it's neededeperson - newly created EPerson record - email + information from the
registration form will have been filled out.
SQLException
public String loginPageURL(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
loginPageURL in interface AuthenticationMethodcontext - DSpace context, will be modified (ePerson set) upon success.request - The HTTP request that started this operation, or null if not
applicable.response - The HTTP response from the servlet method.
public String loginPageTitle(Context context)
loginPageTitle in interface AuthenticationMethodcontext - DSpace context, will be modified (ePerson set) upon success.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||