projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18219: Extracts 'properties' into a separate interface for typing reasons.
[arvados-workbench2.git]
/
src
/
models
/
api-client-authorization.ts
diff --git
a/src/models/api-client-authorization.ts
b/src/models/api-client-authorization.ts
index aff50be6d3aed62945ab5d02622c02ac243a39d4..c1f948a1e98e4142710a78d6b4d606e124597d4d 100644
(file)
--- a/
src/models/api-client-authorization.ts
+++ b/
src/models/api-client-authorization.ts
@@
-2,7
+2,9
@@
//
// SPDX-License-Identifier: AGPL-3.0
//
// SPDX-License-Identifier: AGPL-3.0
-export interface ApiClientAuthorization {
+import { Resource } from 'models/resource';
+
+export interface ApiClientAuthorization extends Resource {
uuid: string;
apiToken: string;
apiClientId: number;
uuid: string;
apiToken: string;
apiClientId: number;
@@
-16,4
+18,7
@@
export interface ApiClientAuthorization {
ownerUuid: string;
defaultOwnerUuid: string;
scopes: string[];
ownerUuid: string;
defaultOwnerUuid: string;
scopes: string[];
-}
\ No newline at end of file
+}
+
+export const getTokenV2 = (aca: ApiClientAuthorization): string =>
+ `v2/${aca.uuid}/${aca.apiToken}`;
\ No newline at end of file