Class HttpBasicAuthenticationProvider
- java.lang.Object
-
- org.camunda.bpm.extension.graphql.auth.impl.HttpBasicAuthenticationProvider
-
- All Implemented Interfaces:
AuthenticationProvider
public class HttpBasicAuthenticationProvider extends Object implements AuthenticationProvider
Authenticates a request against the provided process engine's identity service by applying http basic authentication.
- Author:
- Thorben Lindhauer
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBASIC_AUTH_HEADER_PREFIX
-
Constructor Summary
Constructors Constructor Description HttpBasicAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaugmentResponseByAuthenticationChallenge(javax.servlet.http.HttpServletResponse response, org.camunda.bpm.engine.ProcessEngine engine)Callback to add an authentication challenge to the response to the client.AuthenticationResultextractAuthenticatedUser(javax.servlet.http.HttpServletRequest request, org.camunda.bpm.engine.ProcessEngine engine)Checks the request for authentication.protected booleanisAuthenticated(org.camunda.bpm.engine.ProcessEngine engine, String userName, String password)
-
-
-
Field Detail
-
BASIC_AUTH_HEADER_PREFIX
protected static final String BASIC_AUTH_HEADER_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
extractAuthenticatedUser
public AuthenticationResult extractAuthenticatedUser(javax.servlet.http.HttpServletRequest request, org.camunda.bpm.engine.ProcessEngine engine)
Description copied from interface:AuthenticationProviderChecks the request for authentication. May not return null, but always anAuthenticationResultthat indicates, whether authentication was successful, and, if true, always provides the authenticated user.- Specified by:
extractAuthenticatedUserin interfaceAuthenticationProvider- Parameters:
request- the request to authenticateengine- the process engine the request addresses. May be used to authenticate against the engine's identity service.
-
isAuthenticated
protected boolean isAuthenticated(org.camunda.bpm.engine.ProcessEngine engine, String userName, String password)
-
augmentResponseByAuthenticationChallenge
public void augmentResponseByAuthenticationChallenge(javax.servlet.http.HttpServletResponse response, org.camunda.bpm.engine.ProcessEngine engine)Description copied from interface:AuthenticationProviderCallback 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".- Specified by:
augmentResponseByAuthenticationChallengein interfaceAuthenticationProviderengine- the process engine the request addressed. May be considered as an authentication realm to create a specific authentication challenge
-
-