Class AuthenticationService
java.lang.Object
com.sap.sapoaacarintegration.services.rest.impl.DefaultRestService
com.sap.sapoaacarintegration.services.rest.util.impl.AuthenticationService
- All Implemented Interfaces:
OaaRestService
Authentication Service calls Service and Fetch x-CSRF token and cookies
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetch X-csrf Token and retrieve the authentication results.protected HttpEntityBuilderprotected HttpHeaderProviderprotected URLProvidervoidsetHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder) voidsetHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider) voidsetUrlProvider(URLProvider urlProvider) Methods inherited from class com.sap.sapoaacarintegration.services.rest.impl.DefaultRestService
beforeRestCall, checkHttpStatusCode, getOutboundHttpClientFactory, getRestServiceConfiguration, getRestTemplate, getSessionService, initialize, setBackendDown, setOutboundHttpClientFactory, setRestServiceConfiguration, setRestTemplate, setSessionService
-
Constructor Details
-
AuthenticationService
public AuthenticationService()
-
-
Method Details
-
execute
public AuthenticationResult execute(String user, String password, String url, String servicePath, String client) throws AuthenticationServiceException, BackendDownException Fetch X-csrf Token and retrieve the authentication results.- Parameters:
user- username detailspassword- password for authenticationurl- access pointservicePath- service URIclient- client details- Returns:
- AuthenticationResult
- Throws:
AuthenticationServiceException- when any client side exception occursBackendDownException- when status code for back end down is given
-
setHttpHeaderProvider
- Parameters:
httpHeaderProvider- the httpHeaderProvider to set
-
getHttpHeaderProvider
- Returns:
- the httpHeaderProvider
-
setHttpEntityBuilder
- Parameters:
httpEntityBuilder- the httpEntityBuilder to set
-
getHttpEntityBuilder
- Returns:
- the httpEntityBuilder
-
setUrlProvider
- Parameters:
urlProvider- the urlProvider to set
-
getUrlProvider
- Returns:
- the urlProvider
-