1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 04:33:38 +00:00

PM-20532 - SendAccessTokenRequest - enshrine send client id in class instead of having as a constructor param.

This commit is contained in:
Jared Snider
2025-05-20 16:12:20 -04:00
parent e5e5582971
commit 10f166269f

View File

@@ -23,8 +23,10 @@ export type SendAccessTokenPayload = SendAccessTokenPayloadBase &
);
export class SendAccessTokenRequest {
/// The client_id for the Send client
private static readonly CLIENT_ID = ClientType.Send as const;
constructor(
public clientId: ClientType,
public sendId: string,
public password?: string,
@@ -38,7 +40,7 @@ export class SendAccessTokenRequest {
*/
toIdentityTokenPayload(): SendAccessTokenPayload {
const base: SendAccessTokenPayloadBase = {
client_id: this.clientId,
client_id: SendAccessTokenRequest.CLIENT_ID,
grant_type: GrantTypes.SendAccess,
scope: Scopes.Send,