|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AuthenticatorFilter
An interface to authenticator filters. Implementing classes typically apply different authentication schemes and use an extended interface providing scheme specific methods.
Based on Authenticator in the Apache Jakarta Tomcat
project.
| Method Summary | |
|---|---|
Principal |
authenticate(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Authenticates a request within the realm of this filter. |
String |
getAuthType()
Gets the authentication scheme. |
String |
getDefaultDomain()
Gets the default domain. |
String |
getFaultyUser(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Gets the faulty user of the specified request. |
int |
getLoginAttempts()
Gets the number of allowed login attempts. |
int |
getLoginAttempts(HttpServletRequest request)
Gets the number of login attempts of the specified request. |
String |
getLogoutFlow()
Gets the logout flow. |
String |
getLogoutHost()
Gets the logout host. |
String |
getLogoutPipe()
Gets the logout pipe. |
String |
getLogoutService()
Gets the logout service. |
String |
getLogoutTemplate()
Gets the logout template. |
String |
getLogoutURI()
Gets the logout URI. |
StringBuilder |
getLogoutURL(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Gets the logout URL, with the scheme, host and port if required, for the specified request. |
String |
getPublicRealmName()
Gets the public name of the realm. |
ObjectName |
getRealmName()
Gets the user authentication realm. |
String |
getUnauthorizedTemplate()
Gets the unauthorized template. |
boolean |
isAuthenticationRequired()
Checks whether authentication is required for unidentified requests. |
boolean |
isAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Checks whether automatic login is enabled for the specified request. |
boolean |
isCachedPrincipalDiscarded()
Checks whether principals authenticated and cached by other authentication objects are discarded and re-authenticated. |
boolean |
isUserInRole(Principal principal,
String role)
Checks whether the specified principal is in the specified security role within the context of the realm of this filter. |
void |
setAuthenticationRequired(boolean flag)
Sets the authentication required flag. |
void |
setAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain,
boolean flag)
Sets whether automatic login is enabled for the specified request. |
void |
setCachedPrincipalDiscarded(boolean flag)
Sets whether principals authenticated and cached by other authentication objects are discarded and re-authenticated. |
void |
setDefaultDomain(String domain)
Sets the the default domain. |
void |
setLoginAttempts(int count)
Sets the number of allowed login attempts. |
void |
setLogoutFlow(String flow)
Sets the logout flow. |
void |
setLogoutHost(String host)
Sets the logout host. |
void |
setLogoutPipe(String pipe)
Sets the logout pipe. |
void |
setLogoutService(String service)
Sets the logout service. |
void |
setLogoutTemplate(String template)
Sets the logout template. |
void |
setLogoutURI(String uri)
Sets the logout URI. |
void |
setPublicRealmName(String name)
Sets the public name of the realm. |
void |
setRealmName(ObjectName realm)
Sets the user authentication realm. |
void |
setUnauthorizedTemplate(String template)
Sets the unauthorized template. |
void |
unauthenticated(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
A handler for unauthenticated requests that should provide an opportunity for the user to re-authenticate himself. |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, doFilter, init |
| Method Detail |
|---|
String getAuthType()
ObjectName getRealmName()
void setRealmName(ObjectName realm)
realm - the name of the realm or a query.String getPublicRealmName()
void setPublicRealmName(String name)
name - the public name of the realm.String getDefaultDomain()
void setDefaultDomain(String domain)
domain - the default domain.boolean isAuthenticationRequired()
void setAuthenticationRequired(boolean flag)
flag - the authentication required flag.boolean isCachedPrincipalDiscarded()
void setCachedPrincipalDiscarded(boolean flag)
flag - the cached principals discarded flag.String getUnauthorizedTemplate()
void setUnauthorizedTemplate(String template)
template - the unauthorized template.int getLoginAttempts()
void setLoginAttempts(int count)
count - the number of login attempts, -1 = unlimited.int getLoginAttempts(HttpServletRequest request)
request - the request.
String getLogoutURI()
void setLogoutURI(String uri)
uri - the logout URI.String getLogoutHost()
void setLogoutHost(String host)
host - the logout host.String getLogoutService()
void setLogoutService(String service)
service - the logout service.String getLogoutPipe()
void setLogoutPipe(String pipe)
pipe - the logout pipe.String getLogoutFlow()
void setLogoutFlow(String flow)
flow - the login flow.String getLogoutTemplate()
void setLogoutTemplate(String template)
template - the logout template.
StringBuilder getLogoutURL(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
String getFaultyUser(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
Principal authenticate(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
void unauthenticated(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
throws ServletException,
IOException
request - the request.response - the response.chain - the filter chain.
ServletException - for servlet errors.
IOException - for general errors.
boolean isUserInRole(Principal principal,
String role)
principal - the principal for whom the role is to be checked.role - the security role to be checked.
boolean isAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
void setAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain,
boolean flag)
request - the request.response - the response.chain - the filter chain.flag - true if enabled, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||