KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > atlassian > seraph > auth > Authenticator


1 package com.atlassian.seraph.auth;
2
3 import com.atlassian.seraph.Initable;
4
5 import javax.servlet.http.HttpServletRequest JavaDoc;
6 import javax.servlet.http.HttpServletResponse JavaDoc;
7 import java.security.Principal JavaDoc;
8
9 /**
10  * An Authenticator is used to authenticate users, log them in, log them out and check their roles.
11  */

12 public interface Authenticator extends Initable
13 {
14     public final String JavaDoc DEFAULT_AUTHENTICATOR = "com.atlassian.seraph.auth.DefaultAuthenticator";
15
16     public void destroy();
17
18     public String JavaDoc getRemoteUser(HttpServletRequest JavaDoc request);
19
20     public Principal JavaDoc getUser(HttpServletRequest JavaDoc request);
21
22     public Principal JavaDoc getUser(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response);
23
24     /** @deprecated Use {@link RoleMapper} directly */
25     public boolean isUserInRole(HttpServletRequest JavaDoc request, String JavaDoc role);
26
27     public boolean login(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response, String JavaDoc username, String JavaDoc password) throws AuthenticatorException;
28
29     public boolean login(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response, String JavaDoc username, String JavaDoc password, boolean storeCookie) throws AuthenticatorException;
30
31     public boolean logout(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) throws AuthenticatorException;
32 }
33
Popular Tags