public final class BasicAuthenticationAccessor extends Object
|Modifier and Type||Method and Description|
The actual implementation used to forward the business logic calls to.
Overrides the currently set facade with the given one, potentially changing the behavior of all following calls to the
Getter to retrieve the basic credentials given by the currently incoming request.
public static void setBasicAuthenticationFacade(@Nullable BasicAuthenticationFacade facade)
In case the given facade is
null the default implementation will be reinstated.
facade- The facade to use for all future calls of the
nullis passed, the
DefaultBasicAuthenticationFacadewill be used instead.
@Nonnull public static io.vavr.control.Try<BasicCredentials> tryGetCurrentBasicCredentials()
If the incoming request contains a basic authentication header the
Try will contain this header as a
BasicCredentials object. If the header was not given, was no basic authentication header or could not be
Try will contain the corresponding exception.
Trycontaining either the
BasicCredentialsor an exception describing the error why the credentials could not be retrieved.
Copyright © 2020 SAP SE. All rights reserved.