Class BasicAuthentication
java.lang.Object
org.citrusframework.http.security.BasicAuthentication
- All Implemented Interfaces:
HttpAuthentication
Basic authentication implementation able to create a proper request factory with basic auth client credentials.
Trying to read hostname and port from given request URL on the Http client in order to set a proper auth scope.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpRequestFactorygetRequestFactory(String requestUrl, HttpClient httpClient) Creates client request factory that uses the given authentication method.org.eclipse.jetty.security.SecurityHandlergetSecurityHandler(String resourcePath) Security handler able to set up server user authentication on given resource path.
-
Constructor Details
-
BasicAuthentication
-
-
Method Details
-
getSecurityHandler
Description copied from interface:HttpAuthenticationSecurity handler able to set up server user authentication on given resource path.- Specified by:
getSecurityHandlerin interfaceHttpAuthentication- Returns:
-
getRequestFactory
public org.springframework.http.client.ClientHttpRequestFactory getRequestFactory(String requestUrl, HttpClient httpClient) Description copied from interface:HttpAuthenticationCreates client request factory that uses the given authentication method.- Specified by:
getRequestFactoryin interfaceHttpAuthentication- Returns:
-
realm
-
userRoles
-