Class AuthenticationService

java.lang.Object
com.sap.sapoaacarintegration.services.rest.impl.DefaultRestService
com.sap.sapoaacarintegration.services.rest.util.impl.AuthenticationService
All Implemented Interfaces:
OaaRestService

public class AuthenticationService extends DefaultRestService
Authentication Service calls Service and Fetch x-CSRF token and cookies
  • 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 details
      password - password for authentication
      url - access point
      servicePath - service URI
      client - client details
      Returns:
      AuthenticationResult
      Throws:
      AuthenticationServiceException - when any client side exception occurs
      BackendDownException - when status code for back end down is given
    • setHttpHeaderProvider

      public void setHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider)
      Parameters:
      httpHeaderProvider - the httpHeaderProvider to set
    • getHttpHeaderProvider

      protected HttpHeaderProvider getHttpHeaderProvider()
      Returns:
      the httpHeaderProvider
    • setHttpEntityBuilder

      public void setHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder)
      Parameters:
      httpEntityBuilder - the httpEntityBuilder to set
    • getHttpEntityBuilder

      protected HttpEntityBuilder getHttpEntityBuilder()
      Returns:
      the httpEntityBuilder
    • setUrlProvider

      public void setUrlProvider(URLProvider urlProvider)
      Parameters:
      urlProvider - the urlProvider to set
    • getUrlProvider

      protected URLProvider getUrlProvider()
      Returns:
      the urlProvider