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:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user