Merge pull request #23437 from backstage/camilaibs/techdocs-auth-services-migration

[TechDocs] Migrate to use new auth services
This commit is contained in:
Patrik Oldsberg
2024-03-12 14:22:40 +01:00
committed by GitHub
18 changed files with 326 additions and 28 deletions
@@ -127,6 +127,11 @@ class TechDocsDevApi implements TechDocsApi {
this.identityApi = identityApi;
}
async getCookie(): Promise<{ expiresAt: string }> {
const tenMinutesFromNow = new Date(Date.now() + 10 * 60 * 1000);
return { expiresAt: tenMinutesFromNow.toISOString() };
}
async getApiOrigin() {
return await this.discoveryApi.getBaseUrl('techdocs');
}