21910: Update all "Authorization: OAuth2 ..." usage to "Bearer".
[arvados.git] / services / workbench2 / src / models / api-client-authorization.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { Resource } from 'models/resource';
6
7 export interface ApiClientAuthorization extends Resource {
8     uuid: string;
9     apiToken: string;
10     userId: number;
11     createdByIpAddress: string;
12     lastUsedByIpAddress: string;
13     lastUsedAt: string;
14     expiresAt: string;
15     createdAt: string;
16     updatedAt: string;
17     ownerUuid: string;
18     scopes: string[];
19 }
20
21 export const getTokenV2 = (aca: ApiClientAuthorization): string =>
22     `v2/${aca.uuid}/${aca.apiToken}`;