| java.lang.Object com.caucho.server.security.AuthenticatorList
AuthenticatorList | public class AuthenticatorList implements ServletAuthenticator(Code) | | The AuthenticatorList is used to configure more than one authenticators in a
list, each authenticator is tried in turn and if the authentication fails the
next authenticator in the list is attempted.
<authenticator type="com.caucho.server.security.AuthenticatorList">
<init>
<authenticator resin:type="com.caucho.server.security.XmlAuthenticator">
<user>admin:NIHlOSafJN2H7emQCkOQ2w==:user,admin</user>
</authenticator>
<authenticator resin:type='com.caucho.server.security.JdbcAuthenticator'>
<data-source>jdbc/users</data-source>
<password-query>
SELECT password FROM LOGIN WHERE username=?
</password-query>
<cookie-auth-query>
SELECT username FROM LOGIN WHERE cookie=?
</cookie-auth-query>
<cookie-auth-update>
UPDATE LOGIN SET cookie=? WHERE username=?
</cookie-auth-update>
<role-query>
SELECT role FROM LOGIN WHERE username=?
</role-query>
</authenticator>
</init>
</authenticator>
<login-config auth-method='basic'/>
<security-constraint url-pattern='/users/*' role-name='user'/>
<security-constraint url-pattern='/admin/*' role-name='admin'/>
|
Method Summary | |
public void | addAuthenticator(ServletAuthenticator authenticator) Sets the path to the XML file. | public Principal | getUserPrincipal(HttpServletRequest request, HttpServletResponse response, ServletContext application) | public void | init() | public boolean | isUserInRole(HttpServletRequest request, HttpServletResponse response, ServletContext application, Principal user, String role) | public Principal | login(HttpServletRequest request, HttpServletResponse response, ServletContext application, String user, String password) | public Principal | loginDigest(HttpServletRequest request, HttpServletResponse response, ServletContext app, String user, String realm, String nonce, String uri, String qop, String nc, String cnonce, byte[] clientDigset) | public void | logout(ServletContext application, HttpSession timeoutSession, String sessionId, Principal user) |
loginDigest | public Principal loginDigest(HttpServletRequest request, HttpServletResponse response, ServletContext app, String user, String realm, String nonce, String uri, String qop, String nc, String cnonce, byte[] clientDigset) throws ServletException(Code) | | |
|
|