backend-plugin-api: added new core identity service
Co-authored-by: Johan Haals <johan.haals@gmail.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
import { Config } from '@backstage/config';
|
||||
import { Handler } from 'express';
|
||||
import { IdentityApi } from '@backstage/plugin-auth-node';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { Knex } from 'knex';
|
||||
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
|
||||
@@ -108,6 +109,7 @@ export namespace coreServices {
|
||||
const scheduler: ServiceRef<SchedulerService, 'plugin'>;
|
||||
const tokenManager: ServiceRef<TokenManagerService, 'plugin'>;
|
||||
const urlReader: ServiceRef<UrlReaderService, 'plugin'>;
|
||||
const identity: ServiceRef<IdentityService, 'plugin'>;
|
||||
}
|
||||
|
||||
// @public
|
||||
@@ -182,6 +184,9 @@ export interface HttpRouterService {
|
||||
use(handler: Handler): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface IdentityService extends IdentityApi {}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface LifecycleService {
|
||||
addShutdownHook(options: LifecycleServiceShutdownHook): void;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"dependencies": {
|
||||
"@backstage/backend-tasks": "workspace:^",
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/plugin-auth-node": "workspace:^",
|
||||
"@backstage/plugin-permission-common": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@types/express": "^4.17.6",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2020 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { IdentityApi } from '@backstage/plugin-auth-node';
|
||||
|
||||
/** @public */
|
||||
export interface IdentityService extends IdentityApi {}
|
||||
@@ -156,4 +156,13 @@ export namespace coreServices {
|
||||
export const urlReader = createServiceRef<
|
||||
import('./UrlReaderService').UrlReaderService
|
||||
>({ id: 'core.urlReader' });
|
||||
|
||||
/**
|
||||
* The service reference for the plugin scoped {@link IdentityService}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const identity = createServiceRef<
|
||||
import('./IdentityService').IdentityService
|
||||
>({ id: 'core.identity' });
|
||||
}
|
||||
|
||||
@@ -49,3 +49,4 @@ export type {
|
||||
SearchResponseFile,
|
||||
UrlReaderService,
|
||||
} from './UrlReaderService';
|
||||
export type { IdentityService } from './IdentityService';
|
||||
|
||||
Reference in New Issue
Block a user