|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.eperson.AccountManager
public class AccountManager
Methods for handling registration by email and forgotten passwords. When someone registers as a user, or forgets their password, the sendRegistrationInfo or sendForgotPasswordInfo methods can be used to send an email to the user. The email contains a special token, a long string which is randomly generated and thus hard to guess. When the user presents the token back to the system, the AccountManager can use the token to determine the identity of the eperson. *NEW* now ignores expiration dates so that tokens never expire
| Constructor Summary | |
|---|---|
protected |
AccountManager()
Protected Constructor |
| Method Summary | |
|---|---|
static void |
deleteToken(Context context,
String token)
Delete token. |
static String |
getEmail(Context context,
String token)
Return the e-mail address referred to by a token, or null if email address can't be found ignores expiration of token |
static EPerson |
getEPerson(Context context,
String token)
Return the EPerson corresponding to token, where token was emailed to the person by either the sendRegistrationInfo or sendForgotPasswordInfo methods. |
static void |
sendForgotPasswordInfo(Context context,
String email)
Email forgot password info to the given email address. |
protected static TableRow |
sendInfo(Context context,
String email,
boolean isRegister,
boolean send)
|
static void |
sendRegistrationInfo(Context context,
String email)
Email registration info to the given email address. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AccountManager()
| Method Detail |
|---|
public static void sendRegistrationInfo(Context context,
String email)
throws SQLException,
IOException,
javax.mail.MessagingException,
AuthorizeException
context - DSpace contextemail - Email address to send the registration email to
SQLException
IOException
javax.mail.MessagingException
AuthorizeException
public static void sendForgotPasswordInfo(Context context,
String email)
throws SQLException,
IOException,
javax.mail.MessagingException,
AuthorizeException
context - DSpace contextemail - Email address to send the forgot-password email to
SQLException
IOException
javax.mail.MessagingException
AuthorizeException
public static EPerson getEPerson(Context context,
String token)
throws SQLException,
AuthorizeException
Return the EPerson corresponding to token, where token was emailed to the person by either the sendRegistrationInfo or sendForgotPasswordInfo methods.
If the token is not found return null.
context - DSpace contexttoken - Account token
SQLException - If the token or eperson cannot be retrieved from the
database.
AuthorizeException
public static String getEmail(Context context,
String token)
throws SQLException
context - DSpace contexttoken - Account token
SQLException
public static void deleteToken(Context context,
String token)
throws SQLException
context - DSpace contexttoken - The token to delete
SQLException - If a database error occurs
protected static TableRow sendInfo(Context context,
String email,
boolean isRegister,
boolean send)
throws SQLException,
IOException,
javax.mail.MessagingException,
AuthorizeException
SQLException
IOException
javax.mail.MessagingException
AuthorizeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||