beps/0003: add TODOs for issuing service tokens

Couple of concerns around how service tokens are issued that came up. First one is whether we should require callers to specify which plugin they want to talk to - as this information can be quite valuable to the implementation. Second is how we make it hard to forget to forward credentials, since the existing interface doesn't really do that.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-02-07 15:14:38 +01:00
committed by GitHub
parent a271f6f233
commit a029c41837
@@ -111,6 +111,8 @@ type BackstageCredentials =
export interface AuthService {
authenticate(token: string): Promise<BackstageCredentials>;
// TODO: should the caller provide the target plugin ID?
// TODO: how can we make it very difficult to forget to forward credentials
issueToken(credentials: BackstageCredentials): Promise<{ token: string }>;
}
```