|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jguard.authentication.http.HttpAuthenticationUtils
public class HttpAuthenticationUtils
Authentication utility class stored on the user's session.
| Constructor Summary | |
|---|---|
HttpAuthenticationUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
authenticate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
boolean afterRegistration)
authenticate user and put the corresponding Subject in its session if succeed. |
javax.security.auth.Subject |
getSubject()
retrieve the subject from the loginContext. |
void |
logout()
logout the user with the related LoginContext. |
void |
refreshUser(JGuardCredential jcredUpdatedUser)
refresh the user stored into the HttpAuthenticationUtils to reflect dynamically changes on connected users, including delete of users. |
static void |
refreshUsers(JGuardCredential identityCredential,
javax.servlet.ServletContext servletContext)
refresh all users which match with the identityCredential. |
static void |
refreshUsers(javax.security.auth.Subject subject,
javax.servlet.ServletContext servletContext)
refresh all users which match with the identityCredential present in the Subject updated. |
void |
sessionDidActivate(javax.servlet.http.HttpSessionEvent sessionEvent)
method called by container when session is deserialized. |
void |
sessionWillPassivate(javax.servlet.http.HttpSessionEvent sessionEvent)
method called by the container when session is serialized. |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
|
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpAuthenticationUtils()
| Method Detail |
|---|
public javax.security.auth.Subject getSubject()
public void logout()
applicationName - username - user loginpassword - user password
public static boolean authenticate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
boolean afterRegistration)
throws java.io.IOException
req - res - boolean - :true if user registration was made just before;
false otherwise.
java.io.IOExceptionpublic void sessionWillPassivate(javax.servlet.http.HttpSessionEvent sessionEvent)
sessionWillPassivate in interface javax.servlet.http.HttpSessionActivationListenersessionEvent - public void sessionDidActivate(javax.servlet.http.HttpSessionEvent sessionEvent)
sessionDidActivate in interface javax.servlet.http.HttpSessionActivationListenersessionEvent -
public void refreshUser(JGuardCredential jcredUpdatedUser)
throws AuthenticationException
jcredUpdatedUser -
AuthenticationExceptionpublic void valueBound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerpublic void valueUnbound(javax.servlet.http.HttpSessionBindingEvent bindingEvent)
valueUnbound in interface javax.servlet.http.HttpSessionBindingListener
public static void refreshUsers(javax.security.auth.Subject subject,
javax.servlet.ServletContext servletContext)
throws AuthenticationException
subject - subject updatedservletContext -
AuthenticationException
public static void refreshUsers(JGuardCredential identityCredential,
javax.servlet.ServletContext servletContext)
throws AuthenticationException
servletContext - identityCredential -
AuthenticationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||