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 Logger
log
protected SecuritySystem
securitySystem
-
Constructor Summary
Constructors Constructor Description HttpAuthenticator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Entry point for a Filter.AuthenticationResult
authenticate(AuthenticationDataSource ds, javax.servlet.http.HttpSession httpSession)
The Public Face of the Authenticator.abstract void
challenge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName, AuthenticationException exception)
Issue a Challenge Response back to the HTTP Client.abstract AuthenticationResult
getAuthenticationResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Parse the incoming request and return an AuthenticationResult.SecuritySession
getSecuritySession(javax.servlet.http.HttpSession httpSession)
User
getSessionUser(javax.servlet.http.HttpSession httpSession)
boolean
isAlreadyAuthenticated(javax.servlet.http.HttpSession httpSession)
void
setSecuritySession(SecuritySession session, javax.servlet.http.HttpSession httpSession)
void
setSessionUser(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:
AuthenticationException
MustChangePasswordException
AccountLockedException
-
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)
-
-