1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
9 // APIClientAuthorization is an arvados#apiClientAuthorization resource.
10 type APIClientAuthorization struct {
11 UUID string `json:"uuid"`
12 APIClientID int `json:"api_client_id"`
13 APIToken string `json:"api_token"`
14 CreatedAt time.Time `json:"created_at"`
15 CreatedByIPAddress *string `json:"created_by_ip_address"`
16 DefaultOwnerUUID *string `json:"default_owner_uuid"`
17 Etag string `json:"etag"`
18 ExpiresAt string `json:"expires_at"`
19 Href string `json:"href"`
20 LastUsedAt time.Time `json:"last_used_at"`
21 LastUsedByIPAddress *string `json:"last_used_by_ip_address"`
22 ModifiedAt time.Time `json:"modified_at"`
23 ModifiedByClientUUID *string `json:"modified_by_client_uuid"`
24 ModifiedByUserUUID *string `json:"modified_by_user_uuid"`
25 OwnerUUID string `json:"owner_uuid"`
26 Scopes []string `json:"scopes"`
27 UserID int `json:"user_id"`
30 // APIClientAuthorizationList is an arvados#apiClientAuthorizationList resource.
31 type APIClientAuthorizationList struct {
32 Items []APIClientAuthorization `json:"items"`
35 func (aca APIClientAuthorization) TokenV2() string {
36 return "v2/" + aca.UUID + "/" + aca.APIToken