|
||||||||||
| 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 java.lang.String |
REQUEST_INTERRUPTED
Session attribute name for storing the return URL where the user should be redirected too once successfully authenticated. |
static java.lang.String |
REQUEST_INTERRUPTED_CHARACTERS
|
static java.lang.String |
REQUEST_INTERRUPTED_HEADER
These store a message giving a reason for why the request is being interrupted. |
static java.lang.String |
REQUEST_INTERRUPTED_MESSAGE
|
static java.lang.String |
REQUEST_RESUME
|
| Constructor Summary | |
|---|---|
AuthenticationUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
allowSetPassword(java.util.Map objectModel,
java.lang.String email)
Determine if the EPerson (to be created or already created) has the ability to set their own password. |
static Context |
authenticate(java.util.Map objectModel,
java.lang.String email,
java.lang.String password,
java.lang.String realm)
Authenticate the current DSpace content based upon given authentication credentials. |
static Context |
authenticateImplicit(java.util.Map objectModel)
Perform implicit authentication. |
static boolean |
canSelfRegister(java.util.Map objectModel,
java.lang.String email)
Determine if the email can register itself or needs to be created by a site administrator first. |
static EPerson |
createNewEperson(java.util.Map objectModel,
java.lang.String email)
Construct a new, mostly blank, eperson for the given email address. |
static void |
interruptRequest(java.util.Map objectModel,
java.lang.String header,
java.lang.String message,
java.lang.String characters)
Interrupt the current request and store if for later resumption. |
static boolean |
isInterupptedRequest(java.util.Map objectModel)
Is there a currently interrupted request? |
static void |
logIn(java.util.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 java.lang.String |
resumeInterruptedRequest(java.util.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 java.lang.String REQUEST_INTERRUPTED
public static final java.lang.String REQUEST_RESUME
public static final java.lang.String REQUEST_INTERRUPTED_HEADER
public static final java.lang.String REQUEST_INTERRUPTED_MESSAGE
public static final java.lang.String REQUEST_INTERRUPTED_CHARACTERS
| Constructor Detail |
|---|
public AuthenticationUtil()
| Method Detail |
|---|
public static Context authenticate(java.util.Map objectModel,
java.lang.String email,
java.lang.String password,
java.lang.String realm)
throws java.sql.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.
java.sql.SQLException
public static Context authenticateImplicit(java.util.Map objectModel)
throws java.sql.SQLException
objectModel - Cocoon's object model.
java.sql.SQLException
public static void logIn(java.util.Map objectModel,
EPerson eperson)
throws java.sql.SQLException
objectModel - The cocoon object model.eperson - the eperson logged in
java.sql.SQLException
public static void resumeLogin(Context context,
javax.servlet.http.HttpServletRequest request)
throws java.sql.SQLException
context - DSpace contextrequest - HTTP Request
java.sql.SQLException
public static void loginAs(Context context,
javax.servlet.http.HttpServletRequest request,
EPerson loginAs)
throws java.sql.SQLException,
AuthorizeException
context - The current DSpace context logged in as a site administratorrequest - The real HTTP request.loginAs - Whom to login as.
java.sql.SQLException
AuthorizeException - using an I18nTransformer key as the message
public static void logOut(Context context,
javax.servlet.http.HttpServletRequest request)
throws java.sql.SQLException
context - DSpace contextrequest - HTTP request
java.sql.SQLException
public static boolean canSelfRegister(java.util.Map objectModel,
java.lang.String email)
throws java.sql.SQLException
objectModel - The Cocoon object modelemail - The email of the person to be registered.
java.sql.SQLException
public static boolean allowSetPassword(java.util.Map objectModel,
java.lang.String email)
throws java.sql.SQLException
objectModel - The Cocoon object modelemail - The email address of the EPerson.
java.sql.SQLException
public static EPerson createNewEperson(java.util.Map objectModel,
java.lang.String email)
throws java.sql.SQLException,
AuthorizeException
objectModel - The Cocoon object model.email - The email address of the new eperson.
java.sql.SQLException
AuthorizeExceptionpublic static boolean isInterupptedRequest(java.util.Map objectModel)
objectModel - The Cocoon object Model
public static void interruptRequest(java.util.Map objectModel,
java.lang.String header,
java.lang.String message,
java.lang.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 java.lang.String resumeInterruptedRequest(java.util.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 | |||||||||