backend-{plugin,app}-api: added addAuthPolicy to HttpRouterService + implementation
Co-authored-by: Fredrik Adelöw <freben@gmail.com> Co-authored-by: Carl-Erik Bergström <cbergstrom@spotify.com> Co-authored-by: blam <ben@blam.sh> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -16,9 +16,17 @@
|
||||
|
||||
import { Handler } from 'express';
|
||||
|
||||
/** @public */
|
||||
export interface HttpRouterServiceAuthPolicy {
|
||||
path: string;
|
||||
allow: 'unauthenticated' | 'user-cookie';
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface HttpRouterService {
|
||||
use(handler: Handler): void;
|
||||
|
||||
addAuthPolicy(policy: HttpRouterServiceAuthPolicy): void;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,10 @@ export type {
|
||||
export type { RootConfigService } from './RootConfigService';
|
||||
export type { DatabaseService } from './DatabaseService';
|
||||
export type { DiscoveryService } from './DiscoveryService';
|
||||
export type { HttpRouterService } from './HttpRouterService';
|
||||
export type {
|
||||
HttpRouterService,
|
||||
HttpRouterServiceAuthPolicy,
|
||||
} from './HttpRouterService';
|
||||
export type {
|
||||
HttpAuthService,
|
||||
BackstageCredentialTypes,
|
||||
|
||||
Reference in New Issue
Block a user