From c4c01fe681ee5704c823e60ceafa5a7db6fb221e Mon Sep 17 00:00:00 2001 From: Jared Snider Date: Mon, 19 May 2025 19:06:34 -0400 Subject: [PATCH] PM-20532 - WIP on Send Token Svc --- .../send-access/abstractions/send-token.service.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libs/common/src/auth/send-access/abstractions/send-token.service.ts b/libs/common/src/auth/send-access/abstractions/send-token.service.ts index e69de29bb2d..1e1b74c8bef 100644 --- a/libs/common/src/auth/send-access/abstractions/send-token.service.ts +++ b/libs/common/src/auth/send-access/abstractions/send-token.service.ts @@ -0,0 +1,14 @@ +export abstract class SendTokenService { + // TODO: talk with Tools about what expected behavior is for expired access tokens. + // Do we implement any local TTL or do we just rely on the server to return a 401 and then we handle that in the api service? + + // SendAccessTokens need to be stored in session storage once retrieved. + // All SendAccessTokens are scoped to a specific send id so all getting and setting should accept a send id. + + // TODO: should this abstraction have separate methods for requesting an access token from the server + // and for getting the access token from storage? Or should it just be one method that does both? + + // Get the access token for a specific send id. + abstract getSendAccessToken: (sendId: string) => Promise; + abstract setSendAccessToken: (sendId: string, token: string) => Promise; +}