fix undefined httpAuth service
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins-backend': patch
|
||||
---
|
||||
|
||||
Fixed an issue where the `httpAuth` service turned out to be undefined
|
||||
@@ -27,6 +27,7 @@ export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider {
|
||||
catalog: CatalogApi;
|
||||
discovery: DiscoveryService;
|
||||
auth?: AuthService;
|
||||
httpAuth?: HttpAuthService;
|
||||
}): DefaultJenkinsInfoProvider;
|
||||
// (undocumented)
|
||||
getInstance(opt: {
|
||||
|
||||
@@ -40,6 +40,7 @@ export const jenkinsPlugin = createBackendPlugin({
|
||||
catalogClient: catalogServiceRef,
|
||||
discovery: coreServices.discovery,
|
||||
auth: coreServices.auth,
|
||||
httpAuth: coreServices.httpAuth,
|
||||
},
|
||||
async init({
|
||||
logger,
|
||||
@@ -49,10 +50,12 @@ export const jenkinsPlugin = createBackendPlugin({
|
||||
catalogClient,
|
||||
discovery,
|
||||
auth,
|
||||
httpAuth,
|
||||
}) {
|
||||
const winstonLogger = loggerToWinstonLogger(logger);
|
||||
const jenkinsInfoProvider = DefaultJenkinsInfoProvider.fromConfig({
|
||||
auth,
|
||||
httpAuth,
|
||||
config,
|
||||
catalog: catalogClient,
|
||||
discovery,
|
||||
@@ -70,6 +73,7 @@ export const jenkinsPlugin = createBackendPlugin({
|
||||
jenkinsInfoProvider,
|
||||
discovery,
|
||||
auth,
|
||||
httpAuth,
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
AuthService,
|
||||
BackstageCredentials,
|
||||
DiscoveryService,
|
||||
HttpAuthService,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { CatalogApi } from '@backstage/catalog-client';
|
||||
import {
|
||||
@@ -197,6 +198,7 @@ export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider {
|
||||
catalog: CatalogApi;
|
||||
discovery: DiscoveryService;
|
||||
auth?: AuthService;
|
||||
httpAuth?: HttpAuthService;
|
||||
}): DefaultJenkinsInfoProvider {
|
||||
const { auth } = createLegacyAuthAdapters(options);
|
||||
return new DefaultJenkinsInfoProvider(
|
||||
|
||||
Reference in New Issue
Block a user