From afebbadd34ade5b1c9e5e57846f71efd3636e995 Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Thu, 18 Feb 2021 04:05:50 +0100 Subject: [PATCH] use token instead of idToken --- plugins/techdocs/dev/api.ts | 4 ++-- plugins/techdocs/src/api.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/techdocs/dev/api.ts b/plugins/techdocs/dev/api.ts index add1415526..5fa494a973 100644 --- a/plugins/techdocs/dev/api.ts +++ b/plugins/techdocs/dev/api.ts @@ -49,12 +49,12 @@ export class TechDocsDevStorageApi implements TechDocsStorage { const apiOrigin = await this.getApiOrigin(); const url = `${apiOrigin}/${name}/${path}`; - const idToken = await this.identityApi.getIdToken(); + const token = await this.identityApi.getIdToken(); const request = await fetch( `${url.endsWith('/') ? url : `${url}/`}index.html`, { - headers: idToken ? { Authorization: `Bearer ${idToken}` } : {}, + headers: token ? { Authorization: `Bearer ${token}` } : {}, }, ); diff --git a/plugins/techdocs/src/api.ts b/plugins/techdocs/src/api.ts index 5518ab4be8..6de94b63bb 100644 --- a/plugins/techdocs/src/api.ts +++ b/plugins/techdocs/src/api.ts @@ -88,10 +88,10 @@ export class TechDocsApi implements TechDocs { const apiOrigin = await this.getApiOrigin(); const requestUrl = `${apiOrigin}/metadata/techdocs/${namespace}/${kind}/${name}`; - const idToken = await this.identityApi.getIdToken(); + const token = await this.identityApi.getIdToken(); const request = await fetch(`${requestUrl}`, { - headers: idToken ? { Authorization: `Bearer ${idToken}` } : {}, + headers: token ? { Authorization: `Bearer ${token}` } : {}, }); const res = await request.json(); @@ -111,10 +111,10 @@ export class TechDocsApi implements TechDocs { const apiOrigin = await this.getApiOrigin(); const requestUrl = `${apiOrigin}/metadata/entity/${namespace}/${kind}/${name}`; - const idToken = await this.identityApi.getIdToken(); + const token = await this.identityApi.getIdToken(); const request = await fetch(`${requestUrl}`, { - headers: idToken ? { Authorization: `Bearer ${idToken}` } : {}, + headers: token ? { Authorization: `Bearer ${token}` } : {}, }); const res = await request.json(); @@ -166,12 +166,12 @@ export class TechDocsStorageApi implements TechDocsStorage { const apiOrigin = await this.getApiOrigin(); const url = `${apiOrigin}/docs/${namespace}/${kind}/${name}/${path}`; - const idToken = await this.identityApi.getIdToken(); + const token = await this.identityApi.getIdToken(); const request = await fetch( `${url.endsWith('/') ? url : `${url}/`}index.html`, { - headers: idToken ? { Authorization: `Bearer ${idToken}` } : {}, + headers: token ? { Authorization: `Bearer ${token}` } : {}, }, );