Package nl.b3p.commons.security.aselect
Class ASelectFilterAuthenticator
- java.lang.Object
-
- nl.b3p.commons.security.aselect.ASelectFilterAuthenticator
-
- All Implemented Interfaces:
org.securityfilter.authenticator.Authenticator
public class ASelectFilterAuthenticator extends Object implements org.securityfilter.authenticator.Authenticator
AFilterSelectAuthenticator - authenticator implementation voor gebruik icm nl.b3p.commons.security.aselect.ASelectAuthenticationFilter Dat filter moet nog eens worden herschreven naar alleen een authenticator voor optimaal gebruik icm SecurityFilter. Voor nu moet het SecurityFilter filter na ASelectAuthorizationFilter in de webapp geconfigureerd worden. Deze authenticator doet dan praktisch hetzelfde als de BasicAuthenticator behalve dat deze authenticator de credentials uit de ASelectTicket op de sessie haalt ipv uit de Authorization header.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_NO_ASELECT_TICKET
static String
ERROR_USERNAME_NOT_AUTHORIZED
protected org.securityfilter.realm.SecurityRealmInterface
realm
protected String
realmName
-
Constructor Summary
Constructors Constructor Description ASelectFilterAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
bypassSecurityForThisRequest(org.securityfilter.filter.SecurityRequestWrapper request, org.securityfilter.filter.URLPatternMatcher patternMatcher)
Return true if security checks should be bypassed for this request.String
getAuthMethod()
Returns ASELECTFILTER as the authentication method.void
init(javax.servlet.FilterConfig filterConfig, org.securityfilter.config.SecurityConfig securityConfig)
Initialize this Authenticator.boolean
processLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response)
Process any login information that was included in the request, if any.boolean
processLogout(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, org.securityfilter.filter.URLPatternMatcher patternMatcher)
Return true if this is a logout request.void
showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-
-
Field Detail
-
realm
protected org.securityfilter.realm.SecurityRealmInterface realm
-
realmName
protected String realmName
-
ERROR_NO_ASELECT_TICKET
public static final String ERROR_NO_ASELECT_TICKET
- See Also:
- Constant Field Values
-
ERROR_USERNAME_NOT_AUTHORIZED
public static final String ERROR_USERNAME_NOT_AUTHORIZED
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig filterConfig, org.securityfilter.config.SecurityConfig securityConfig) throws Exception
Initialize this Authenticator.- Specified by:
init
in interfaceorg.securityfilter.authenticator.Authenticator
- Parameters:
filterConfig
-securityConfig
-- Throws:
Exception
-
getAuthMethod
public String getAuthMethod()
Returns ASELECTFILTER as the authentication method.- Specified by:
getAuthMethod
in interfaceorg.securityfilter.authenticator.Authenticator
- Returns:
- ASELECTFILTER
-
processLogin
public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response) throws Exception
Process any login information that was included in the request, if any. Returns true if SecurityFilter should abort further processing after the method completes (for example, if a redirect was sent as part of the login processing).- Specified by:
processLogin
in interfaceorg.securityfilter.authenticator.Authenticator
- Parameters:
request
-response
-- Returns:
- true if the filter should return after this method ends, false otherwise
- Throws:
Exception
-
showLogin
public void showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
- Specified by:
showLogin
in interfaceorg.securityfilter.authenticator.Authenticator
- Throws:
IOException
-
bypassSecurityForThisRequest
public boolean bypassSecurityForThisRequest(org.securityfilter.filter.SecurityRequestWrapper request, org.securityfilter.filter.URLPatternMatcher patternMatcher)
Return true if security checks should be bypassed for this request. Always returns false for this authenticator.- Specified by:
bypassSecurityForThisRequest
in interfaceorg.securityfilter.authenticator.Authenticator
- Parameters:
request
-patternMatcher
-- Returns:
- always returns false
-
processLogout
public boolean processLogout(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, org.securityfilter.filter.URLPatternMatcher patternMatcher)
Return true if this is a logout request. Always returns false for BASIC authenticator.- Specified by:
processLogout
in interfaceorg.securityfilter.authenticator.Authenticator
- Parameters:
request
-response
-patternMatcher
-- Returns:
- always returns false
-
-