Class HttpAuthenticator
- java.lang.Object
-
- org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator
-
- Direct Known Subclasses:
HttpBasicAuthentication,HttpDigestAuthentication
public abstract class HttpAuthenticator extends Object
HttpAuthenticator- Author:
- Joakim Erdfelt
-
-
Field Summary
Fields Modifier and Type Field Description protected Loggerlogprotected SecuritySystemsecuritySystem
-
Constructor Summary
Constructors Constructor Description HttpAuthenticator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidauthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Entry point for a Filter.AuthenticationResultauthenticate(AuthenticationDataSource ds, javax.servlet.http.HttpSession httpSession)The Public Face of the Authenticator.abstract voidchallenge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName, AuthenticationException exception)Issue a Challenge Response back to the HTTP Client.abstract AuthenticationResultgetAuthenticationResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Parse the incoming request and return an AuthenticationResult.SecuritySessiongetSecuritySession(javax.servlet.http.HttpSession httpSession)UsergetSessionUser(javax.servlet.http.HttpSession httpSession)booleanisAlreadyAuthenticated(javax.servlet.http.HttpSession httpSession)voidsetSecuritySession(SecuritySession session, javax.servlet.http.HttpSession httpSession)voidsetSessionUser(User user, javax.servlet.http.HttpSession httpSession)
-
-
-
Field Detail
-
securitySystem
@Inject protected SecuritySystem securitySystem
-
-
Constructor Detail
-
HttpAuthenticator
public HttpAuthenticator()
-
-
Method Detail
-
authenticate
public AuthenticationResult authenticate(AuthenticationDataSource ds, javax.servlet.http.HttpSession httpSession) throws AuthenticationException, AccountLockedException, MustChangePasswordException
The Public Face of the Authenticator.
-
authenticate
public void authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws AuthenticationException
Entry point for a Filter.- Parameters:
request-response-- Throws:
AuthenticationException
-
challenge
public abstract void challenge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName, AuthenticationException exception) throws IOException
Issue a Challenge Response back to the HTTP Client.- Parameters:
request-response-realmName-exception-- Throws:
IOException
-
getAuthenticationResult
public abstract AuthenticationResult getAuthenticationResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws AuthenticationException, AccountLockedException, MustChangePasswordException
Parse the incoming request and return an AuthenticationResult.- Parameters:
request-response-- Returns:
- null if no http auth credentials, or the actual authentication result based on the credentials.
- Throws:
AuthenticationExceptionMustChangePasswordExceptionAccountLockedException
-
getSessionUser
public User getSessionUser(javax.servlet.http.HttpSession httpSession)
-
isAlreadyAuthenticated
public boolean isAlreadyAuthenticated(javax.servlet.http.HttpSession httpSession)
-
getSecuritySession
public SecuritySession getSecuritySession(javax.servlet.http.HttpSession httpSession)
-
setSecuritySession
public void setSecuritySession(SecuritySession session, javax.servlet.http.HttpSession httpSession)
-
setSessionUser
public void setSessionUser(User user, javax.servlet.http.HttpSession httpSession)
-
-