Class DefaultBasicAuthenticationFacade

java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.DefaultBasicAuthenticationFacade
All Implemented Interfaces:
BasicAuthenticationFacade

public class DefaultBasicAuthenticationFacade extends Object implements BasicAuthenticationFacade
Default implementation of the BasicAuthenticationAccessor reading the username and password from the current ThreadContext or, after that, from the currently incoming request and returning it as a BasicCredentials object.
  • Constructor Details

    • DefaultBasicAuthenticationFacade

      public DefaultBasicAuthenticationFacade()
  • Method Details

    • tryGetBasicCredentials

      @Nonnull public io.vavr.control.Try<BasicCredentials> tryGetBasicCredentials()
      Description copied from interface: BasicAuthenticationFacade
      Retrieves the username password pair and returns them as Try.Success. If they could not be retrieved or an error occurred while parsing them a Try.Failure containing the exception will be returned.
      Specified by:
      tryGetBasicCredentials in interface BasicAuthenticationFacade
      Returns:
      A Try containing either the retrieved BasicCredentials or an Exception.