|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.filters.PasswordFilter
public class PasswordFilter
Save a password that the user submits as the session attribute 'java.naming.security.credentials'.
Enable with:
<filter filter-name='password' filter-class='com.caucho.filters.PasswordFilter'/> <filter-mapping filter-name='password' url-pattern='j_security_check'/>Test with this in a JSP:
<% if (request.getUserPrincipal() != null) { %> username: <%= request.getRemoteUser() %> password: <%= session.getAttribute("java.naming.security.credentials") %> <% } %>This will work with a form based login.
Constructor Summary | |
---|---|
PasswordFilter()
|
Method Summary | |
---|---|
void |
destroy()
Cleanup the filter. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain next)
doFilter performs the actual work of a filter, either modifying the request or the response. |
void |
init(FilterConfig config)
Initialize the filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PasswordFilter()
Method Detail |
---|
public void init(FilterConfig config)
Filter
init
in interface Filter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain next) throws java.io.IOException, ServletException
Filter
doFilter
in interface Filter
request
- the servlet requestresponse
- the servlet responsenext
- the next filter in the chain
java.io.IOException
ServletException
public void destroy()
Filter
destroy
in interface Filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |