|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.xmlui.utils.AuthenticationUtil
public class AuthenticationUtil
Methods for authenticating the user. This is DSpace platform code, as opposed to the site-specific authentication code, that resides in implementations of the org.dspace.eperson.AuthenticationMethod interface.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
AuthenticationUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
allowSetPassword(Map objectModel,
String email)
Determine if the EPerson (to be created or already created) has the ability to set their own password. |
static Context |
authenticate(Map objectModel,
String email,
String password,
String realm)
Authenticate the current DSpace content based upon given authentication credentials. |
static Context |
authenticateImplicit(Map objectModel)
Perform implicit authentication. |
static boolean |
canSelfRegister(Map objectModel,
String email)
Determine if the email can register itself or needs to be created by a site administrator first. |
static EPerson |
createNewEperson(Map objectModel,
String email)
Construct a new, mostly blank, eperson for the given email address. |
static void |
interruptRequest(Map objectModel,
String header,
String message,
String characters)
Interrupt the current request and store if for later resumption. |
static boolean |
isInterupptedRequest(Map objectModel)
Is there a currently interrupted request? |
static void |
logIn(Map objectModel,
EPerson eperson)
Log the given user in as a real authenticated user. |
static void |
loginAs(Context context,
javax.servlet.http.HttpServletRequest request,
EPerson loginAs)
Assume the login as another user. |
static void |
logOut(Context context,
javax.servlet.http.HttpServletRequest request)
Log the user out. |
static String |
resumeInterruptedRequest(Map objectModel)
Set the interrupted request to a resumable state. |
static void |
resumeLogin(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public AuthenticationUtil()
| Method Detail |
|---|
public static Context authenticate(Map objectModel,
String email,
String password,
String realm)
throws SQLException
objectModel - Cocoon's object model.email - The email credentials provided by the user.password - The password credentials provided by the user.realm - The realm credentials provided by the user.
SQLException
public static Context authenticateImplicit(Map objectModel)
throws SQLException
objectModel - Cocoon's object model.
SQLException
public static void logIn(Map objectModel,
EPerson eperson)
throws SQLException
objectModel - The cocoon object model.eperson - the eperson logged in
SQLException
public static void resumeLogin(Context context,
javax.servlet.http.HttpServletRequest request)
throws SQLException
context - DSpace contextrequest - HTTP Request
SQLException
public static void loginAs(Context context,
javax.servlet.http.HttpServletRequest request,
EPerson loginAs)
throws SQLException,
AuthorizeException
context - The current DSpace context logged in as a site administratorrequest - The real HTTP request.loginAs - Whom to login as.
SQLException
AuthorizeException - using an I18nTransformer key as the message
public static void logOut(Context context,
javax.servlet.http.HttpServletRequest request)
throws SQLException
context - DSpace contextrequest - HTTP request
SQLException
public static boolean canSelfRegister(Map objectModel,
String email)
throws SQLException
objectModel - The Cocoon object modelemail - The email of the person to be registered.
SQLException
public static boolean allowSetPassword(Map objectModel,
String email)
throws SQLException
objectModel - The Cocoon object modelemail - The email address of the EPerson.
SQLException
public static EPerson createNewEperson(Map objectModel,
String email)
throws SQLException,
AuthorizeException
objectModel - The Cocoon object model.email - The email address of the new eperson.
SQLException
AuthorizeExceptionpublic static boolean isInterupptedRequest(Map objectModel)
objectModel - The Cocoon object Model
public static void interruptRequest(Map objectModel,
String header,
String message,
String characters)
objectModel - The Cocoon object Modelheader - A message header (i18n tag)message - A message for why the request was interrupted (i18n tag)characters - An untranslated message, perhaps an error message?public static String resumeInterruptedRequest(Map objectModel)
objectModel - The Cocoon object Model
public static javax.servlet.http.HttpServletRequest resumeRequest(javax.servlet.http.HttpServletRequest realHttpRequest)
realHttpRequest - The current real request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||