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:
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user