mockServices.httpAuth.factory()
Home > @backstage/backend-test-utils > mockServices > httpAuth > factory
Creates a mock service factory for the HttpAuthService.
By default all requests without credentials are treated as requests from the default mock user principal. This behavior can be configured with the defaultCredentials option.
Signature:
factory: (options?: {
defaultCredentials?: BackstageCredentials;
}) => ServiceFactory<HttpAuthService, "plugin", "singleton">
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
options |
{ defaultCredentials?: BackstageCredentials; } |
(Optional) |
ServiceFactory<HttpAuthService, "plugin", "singleton">