|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.password.SecurePasswordStoreFactory
public class SecurePasswordStoreFactory
SecurePasswordStoreFactory returns instances of SecurePasswordStore for Dekoh applications. Each
Dekoh user gets a different instance of password store for the same application.
public void contextInitialized(ServletContextEvent sce) {
SecurePasswordStoreFactory factory = SecurePasswordStoreFactory.getAppPasswordStoreFactory();
sce.getServletContext().setAttribute("myAppsPasswordStoreFactory", factory);
}
....
void storePassword(HttpServletRequest request, String password) {
ServletContext servletContext = request.getSession().getServletContext();
SecurePasswordStore userPasswordStore = servletContext.getAttribute("myAppsPasswordStoreFactory").getDekohUserPasswordStore(request);
userPasswordStore.storePassword(password);
}
| Method Summary | |
|---|---|
static SecurePasswordStoreFactory |
getAppPasswordStoreFactory()
|
PasswordStore |
getDekohUserPasswordStore(DesktopUser user)
Caller application is expected to manage the returned instance user's password store instance, such that only one instance (per user) is available. |
PasswordStore |
getDekohUserPasswordStore(HttpServletRequest request)
Gets an already open password store or opens the password store of current Dekoh user using his master password for the accessing application. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SecurePasswordStoreFactory getAppPasswordStoreFactory()
SecurePasswordStore instances for
Dekoh users. It is important that this method be called with-in a Web request/ servlet context
initialization.
public PasswordStore getDekohUserPasswordStore(DesktopUser user)
throws IOException
HttpSession.
Using method SecurePasswordStoreFactory.getDekohUserPasswordStore(javax.servlet.http.HttpServletRequest) will relieve caller
application of the headache of managing the user's password store instance.
user -
IOException
public PasswordStore getDekohUserPasswordStore(HttpServletRequest request)
throws IOException
policy chosen by acessing user.
The opened password store object is kept the accessing application's HTTP session and subsequent calls to this
method will return this object from the sesion.
request - http request object, derives the logged in Dekoh user from this object, puts the created password
store in the session of this request object
IOException - when user data directory could not be created.
com.pramati.bfly.das.password.exception.IncorrectMasterPasswordException
com.pramati.bfly.das.password.exception.DekohUserNotLoggedInException
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers