Class HttpDigestAuthentication
- java.lang.Object
-
- org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator
-
- org.apache.archiva.redback.integration.filter.authentication.digest.HttpDigestAuthentication
-
@Service("httpAuthenticator#digest") public class HttpDigestAuthentication extends HttpAuthenticator
HttpDigestAuthentication methods for working with RFC 2617 HTTP Authentication.- Author:
- Joakim Erdfelt
-
-
Field Summary
-
Fields inherited from class org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator
log, securitySystem
-
-
Constructor Summary
Constructors Constructor Description HttpDigestAuthentication()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
challenge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName, AuthenticationException exception)
Issue HTTP Digest Authentication ChallengeUser
findUser(String username)
AuthenticationResult
getAuthenticationResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Parse the incoming request and return an AuthenticationResult.String
getId()
String
getRealm()
void
setRealm(String realm)
-
Methods inherited from class org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator
authenticate, authenticate, getSecuritySession, getSessionUser, isAlreadyAuthenticated, setSecuritySession, setSessionUser
-
-
-
-
Constructor Detail
-
HttpDigestAuthentication
public HttpDigestAuthentication()
-
-
Method Detail
-
getAuthenticationResult
public AuthenticationResult getAuthenticationResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws AuthenticationException, AccountLockedException, MustChangePasswordException
Description copied from class:HttpAuthenticator
Parse the incoming request and return an AuthenticationResult.- Specified by:
getAuthenticationResult
in classHttpAuthenticator
- Returns:
- null if no http auth credentials, or the actual authentication result based on the credentials.
- Throws:
AuthenticationException
AccountLockedException
MustChangePasswordException
-
findUser
public User findUser(String username) throws HttpAuthenticationException
- Throws:
HttpAuthenticationException
-
challenge
public void challenge(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName, AuthenticationException exception) throws IOException
Issue HTTP Digest Authentication Challenge- Specified by:
challenge
in classHttpAuthenticator
- Parameters:
request
- the request to use.response
- the response to use.realmName
- the realm name to state.exception
- the exception to base the message off of.- Throws:
IOException
- if there was a problem with theHttpServletResponse.sendError(int, String)
call.
-
-