7c17cdef04debdf4540b6c2de761673c34d01883
[arvados.git] / sdk / go / arvados / api_client_authorization.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 package arvados
6
7 // APIClientAuthorization is an arvados#apiClientAuthorization resource.
8 type APIClientAuthorization struct {
9         UUID      string   `json:"uuid"`
10         APIToken  string   `json:"api_token"`
11         ExpiresAt string   `json:"expires_at"`
12         Scopes    []string `json:"scopes"`
13 }
14
15 // APIClientAuthorizationList is an arvados#apiClientAuthorizationList resource.
16 type APIClientAuthorizationList struct {
17         Items []APIClientAuthorization `json:"items"`
18 }
19
20 func (aca APIClientAuthorization) TokenV2() string {
21         return "v2/" + aca.UUID + "/" + aca.APIToken
22 }