public class AuthenticationUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
REQUEST_INTERRUPTED
Session attribute name for storing the return URL where the user should
be redirected too once successfully authenticated.
|
static String |
REQUEST_INTERRUPTED_CHARACTERS |
static String |
REQUEST_INTERRUPTED_HEADER
These store a message giving a reason for why the request is being interrupted.
|
static String |
REQUEST_INTERRUPTED_MESSAGE |
static String |
REQUEST_RESUME |
| Constructor and Description |
|---|
AuthenticationUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.dspace.core.Context |
authenticate(javax.servlet.http.HttpServletRequest request,
String email,
String password,
String realm)
Authenticate the current DSpace content based upon given authentication
credentials.
|
static org.dspace.core.Context |
authenticateImplicit(javax.servlet.http.HttpServletRequest request)
Perform implicit authentication.
|
static boolean |
isLoggedIn(javax.servlet.http.HttpServletRequest request)
Has this user authenticated?
|
static void |
logIn(javax.servlet.http.HttpServletRequest request,
org.dspace.eperson.EPerson eperson)
Log the given user in as a real authenticated user.
|
static void |
logOut(org.dspace.core.Context context,
javax.servlet.http.HttpServletRequest request)
Log the user out.
|
static void |
resumeLogin(org.dspace.core.Context context,
javax.servlet.http.HttpServletRequest request)
Check to see if there are any session attributes indicating a currently authenticated
user.
|
static javax.servlet.http.HttpServletRequest |
resumeRequest(javax.servlet.http.HttpServletRequest realHttpRequest)
Check to see if this request should be resumed.
|
public static final String REQUEST_INTERRUPTED
public static final String REQUEST_RESUME
public static final String REQUEST_INTERRUPTED_HEADER
public static final String REQUEST_INTERRUPTED_MESSAGE
public static final String REQUEST_INTERRUPTED_CHARACTERS
public static org.dspace.core.Context authenticate(javax.servlet.http.HttpServletRequest request,
String email,
String password,
String realm)
throws SQLException
request - Http Request Objectemail - The email credentials provided by the user.password - The password credentials provided by the user.realm - The realm credentials provided by the user.SQLExceptionpublic static org.dspace.core.Context authenticateImplicit(javax.servlet.http.HttpServletRequest request)
throws SQLException
request - Http RequestSQLExceptionpublic static void logIn(javax.servlet.http.HttpServletRequest request,
org.dspace.eperson.EPerson eperson)
throws SQLException
request - HTTP requesteperson - the eperson logged inSQLExceptionpublic static void resumeLogin(org.dspace.core.Context context,
javax.servlet.http.HttpServletRequest request)
throws SQLException
context - DSpace contextrequest - HTTP RequestSQLExceptionpublic static void logOut(org.dspace.core.Context context,
javax.servlet.http.HttpServletRequest request)
throws SQLException
context - DSpace contextrequest - HTTP requestSQLExceptionpublic static boolean isLoggedIn(javax.servlet.http.HttpServletRequest request)
request - public static javax.servlet.http.HttpServletRequest resumeRequest(javax.servlet.http.HttpServletRequest realHttpRequest)
realHttpRequest - The current real requestCopyright © 2016 DuraSpace. All rights reserved.