net.spy.jwebkit.auth
Interface AuthAdaptor

All Known Subinterfaces:
DigestSupportAuthAdaptor, PasswordCheckingAuthAdaptor
All Known Implementing Classes:
PropPasswdAuthAdaptor, SimpleAuthAdaptor

public interface AuthAdaptor

Authentication adaptor to return whether a role is available to a principal.


Method Summary
 void didAuthenticate(java.security.Principal p, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Invoked after a user-agent has successfully authenticated.
 void init(javax.servlet.FilterConfig conf)
          Initialize this AuthAdaptor with the given filter config.
 boolean isPrincipalInRole(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, javax.servlet.ServletContext context, java.security.Principal user, java.lang.String role)
          Determine whether the given Principal is in the given role.
 

Method Detail

init

void init(javax.servlet.FilterConfig conf)
          throws javax.servlet.ServletException
Initialize this AuthAdaptor with the given filter config.

Parameters:
conf - the filter config
Throws:
javax.servlet.ServletException - if initialization fails

isPrincipalInRole

boolean isPrincipalInRole(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res,
                          javax.servlet.ServletContext context,
                          java.security.Principal user,
                          java.lang.String role)
Determine whether the given Principal is in the given role.

Parameters:
req - servlet request
res - servlet response
context - the servlet context
user - the Principa
role - the role we need
Returns:
true if the user is in the given role

didAuthenticate

void didAuthenticate(java.security.Principal p,
                     javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
Invoked after a user-agent has successfully authenticated. Note that this will most likely be called many times since each request will be authenticated individually.

Parameters:
p - the principal
req - the request
res - the response


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.