From a5f71d00ff06aa672c194823dd4b57af7b1256bc Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 5 Apr 2024 16:17:49 +0200 Subject: [PATCH] backend-app-api: reorder auth service methods in implementation Signed-off-by: Patrik Oldsberg --- .../implementations/auth/authServiceFactory.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts b/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts index f2b9bb7cd4..e0ecf16092 100644 --- a/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/auth/authServiceFactory.ts @@ -115,11 +115,6 @@ class DefaultAuthService implements AuthService { private readonly pluginTokenHandler: PluginTokenHandler, ) {} - async listPublicServiceKeys(): Promise<{ keys: JsonObject[] }> { - const { keys } = await this.publicKeyStore.listKeys(); - return { keys: keys.map(({ key }) => key) }; - } - // allowLimitedAccess is currently ignored, since we currently always use the full user tokens async authenticate(token: string): Promise { const pluginResult = await this.pluginTokenHandler.verifyToken(token); @@ -235,6 +230,11 @@ class DefaultAuthService implements AuthService { return this.userTokenHandler.createLimitedUserToken(backstageToken); } + async listPublicServiceKeys(): Promise<{ keys: JsonObject[] }> { + const { keys } = await this.publicKeyStore.listKeys(); + return { keys: keys.map(({ key }) => key) }; + } + #getJwtExpiration(token: string) { const { exp } = decodeJwt(token); if (!exp) {