1 29 30 package com.caucho.server.security; 31 32 import javax.servlet.ServletContext ; 33 import javax.servlet.ServletException ; 34 import javax.servlet.http.HttpServletRequest ; 35 import javax.servlet.http.HttpServletResponse ; 36 import javax.servlet.http.HttpSession ; 37 import java.security.Principal ; 38 39 79 public interface ServletAuthenticator { 80 84 public void init() 85 throws ServletException ; 86 87 106 public Principal login(HttpServletRequest request, 107 HttpServletResponse response, 108 ServletContext application, 109 String user, String password) 110 throws ServletException ; 111 112 128 public Principal getUserPrincipal(HttpServletRequest request, 129 HttpServletResponse response, 130 ServletContext application) 131 throws ServletException ; 132 133 163 public Principal loginDigest(HttpServletRequest request, 164 HttpServletResponse response, 165 ServletContext app, 166 String user, String realm, 167 String nonce, String uri, 168 String qop, String nc, String cnonce, 169 byte []clientDigset) 170 throws ServletException ; 171 172 184 public boolean isUserInRole(HttpServletRequest request, 185 HttpServletResponse response, 186 ServletContext application, 187 Principal user, String role) 188 throws ServletException ; 189 190 197 public void logout(ServletContext application, 198 HttpSession session, 199 String sessionId, 200 Principal user) 201 throws ServletException ; 202 } 203 | Popular Tags |