backend-*-api: updates auth APIs for BEP changes

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-02-15 14:45:08 +01:00
parent 05b7e91861
commit 413a9e7de8
11 changed files with 65 additions and 76 deletions
@@ -70,10 +70,12 @@ export interface AuthService {
type: TType,
): credentials is BackstageCredentials<BackstagePrincipalTypes[TType]>;
getOwnCredentials(): Promise<BackstageCredentials<BackstageServicePrincipal>>;
getOwnServiceCredentials(): Promise<
BackstageCredentials<BackstageServicePrincipal>
>;
// TODO: should the caller provide the target plugin ID?
issueServiceToken(options: {
forward: BackstageCredentials;
getPluginRequestToken(options: {
onBehalfOf: BackstageCredentials;
targetPluginId: string;
}): Promise<{ token: string }>;
}
@@ -27,9 +27,5 @@ export interface HttpAuthService {
},
): Promise<BackstageCredentials<BackstagePrincipalTypes[TAllowed]>>;
requestHeaders(options: {
forward: BackstageCredentials;
}): Promise<Record<string, string>>;
issueUserCookie(res: Response): Promise<void>;
}