public class HttpBasicAuthenticationProvider extends Object implements AuthenticationProvider
Authenticates a request against the provided process engine's identity service by applying http basic authentication.
Modifier and Type | Field and Description |
---|---|
protected static String |
BASIC_AUTH_HEADER_PREFIX |
Constructor and Description |
---|
HttpBasicAuthenticationProvider() |
Modifier and Type | Method and Description |
---|---|
void |
augmentResponseByAuthenticationChallenge(javax.servlet.http.HttpServletResponse response,
ProcessEngine engine)
Callback to add an authentication challenge to the response to the client.
|
AuthenticationResult |
extractAuthenticatedUser(javax.servlet.http.HttpServletRequest request,
ProcessEngine engine)
Checks the request for authentication.
|
protected boolean |
isAuthenticated(ProcessEngine engine,
String userName,
String password) |
protected static final String BASIC_AUTH_HEADER_PREFIX
public AuthenticationResult extractAuthenticatedUser(javax.servlet.http.HttpServletRequest request, ProcessEngine engine)
AuthenticationProvider
AuthenticationResult
that indicates, whether
authentication was successful, and, if true, always provides the authenticated user.extractAuthenticatedUser
in interface AuthenticationProvider
request
- the request to authenticateengine
- the process engine the request addresses. May be used to authenticate against the engine's identity service.protected boolean isAuthenticated(ProcessEngine engine, String userName, String password)
public void augmentResponseByAuthenticationChallenge(javax.servlet.http.HttpServletResponse response, ProcessEngine engine)
AuthenticationProvider
Callback to add an authentication challenge to the response to the client. Called in case of unsuccessful authentication.
For example, a Http Basic auth implementation may set the WWW-Authenticate header to Basic realm="engine name"
.
augmentResponseByAuthenticationChallenge
in interface AuthenticationProvider
engine
- the process engine the request addressed. May be considered as an authentication realm to create a specific authentication
challengeCopyright © 2021. All rights reserved.