-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhm-service-account-token-v1.yml
205 lines (186 loc) · 6.51 KB
/
hm-service-account-token-v1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
openapi: 3.0.3
info:
title: Service Account Token API
description: |-
**_These APIs are deprecated, use OAuth2 with client_credentials_**
Service Account Token API is an API based on [JSON Web Token (JWT) Profile
for OAuth 2.0 Client Authentication and Authorization Grants](https://datatracker.ietf.org/doc/html/rfc7523) specification.
Sandbox server: `https://sandbox.api.high-mobility.com`
Production server: `https://api.high-mobility.com`
contact:
email: [email protected]
version: 1.0.0
externalDocs:
description: High Mobility's Developer Console
url: https://www.high-mobility.com
servers:
- url: https://sandbox.api.high-mobility.com
- url: https://api.high-mobility.com
paths:
/v1/auth_tokens:
post:
deprecated: true
tags:
- Deprecated
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountTokenRequest'
summary: ''
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountTokenResponse'
description: Success
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/AuthTokenUnauthorizedErrors'
description: When the JWT is invalid or not signed correctly
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Errors
'500':
description: Server Errors
operationId: ApiWeb.ServiceAccountTokenController.create
description: >-
Deprecation: This API is deprecated, use OAuth2 with client_credentials
/v1/auth_tokens/{auth_token}:
delete:
deprecated: true
tags:
- Deprecated
summary: ''
parameters:
- schema:
type: string
required: true
name: auth_token
in: path
description: The Auth token to revoke
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceAccountTokenResponse'
description: Success
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedErrors'
description: When an invalid ServiceAccountToken is used.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Success
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
description: Errors
'500':
description: Server Errors
operationId: ApiWeb.ServiceAccountTokenController.delete
description: Revokes a Service Account API authorization token.
components:
schemas:
ServiceAccountTokenRequest:
type: object
properties:
assertion:
type: string
description: >-
A JWT Signed with the service account key, read more at
https://high-mobility.com/learn/documentation/cloud-api/service-account-api/intro/
example:
assertion: >-
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJ2ZXIiOjEsImp0aSI6IjA3M2UxOTM1LTkwZDAtNDE0Mi05MTgzLWE4ZTAxNzNhZDJlNyIsImlzcyI6IjAxMDA4MmNjLTYzZTAtNGRmMy05ZmRhLTAzZThkOWQzN2I1OCIsImlhdCI6IjIwMTYtMTAtMDZUMTc6MDQ6MzQuNDQzNDc5KzAwOjAwIiwiYXVkIjoiaHR0cHM6Ly9hcGkuaGlnaC1tb2JpbGl0eS5jb20vYXBpL3YxIn0.MEQCIG8VHMVGJL_rAaxWEvWMoSMmxNBn9Fl46zcEP9l4fFGNAiBDr9bCzx0MLi0pDBMTg1w9ZAl6VJuxeVIC7c6o8YfxQw
grant_type: urn:ietf:params:oauth:grant-type:jwt-bearer
UnauthorizedErrors:
type: object
title: Errors
properties:
errors:
description: List of errors
type: array
items:
$ref: '#/components/schemas/Errors'
example:
- detail: >
Missing or invalid authorization header. The token must be
obtained through the service account API and sent as a header with
the format "Authorization: Bearer <token>"
source: Authorization
ServiceAccountTokenResponse:
type: object
title: ServiceAccountToken
required:
- valid_until
- valid_from
- auth_token
properties:
access_token:
type: string
valid_until:
type: string
description: When the token expires, formatted in ISO8601
valid_from:
type: string
description: From when the token is valid, formatted in ISO8601
auth_token:
type: string
description: The authorization token
example:
token_type: bearer
expires_in: 300
access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODgzNzkwMzksImlhdCI6MTY4ODM3ODczOSwiaXNzIjoiaHR0cHM6Ly9zYW5kYm94LmFwaS5oaWdoLW1vYmlsaXR5LmNvbS92MS9hdXRoX3Rva2VucyIsImp0aSI6IjFiY2ZjOTBkLTQ2NTMtNDQyZS05MmE3LWM5N2U2MmMxMDlmYyIsInNlcnZpY2VfYWNjb3VudF9pZCI6IjYxOTZmZTZlLWE0ZTQtNDZjYi1iM2U3LTZiODk5MmFlOGFjOCIsInN1YiI6IjUxYTNmYmQ5LWEwZjUtNDY1Yi1iOTA3LTM5MWQ1YTBmNjM3NiIsInZlciI6MX0.sXYHak_aKTsqMC5ILgfu-PCgWsACbrdHDKjHRFNTm0M
scope: "fleet:clearance fleet:geofencing vehicle:eligibility-check vehicle:data"
Errors:
type: array
title: Errors
items:
$ref: '#/components/schemas/Error'
description: List of errors
Error:
type: object
title: Error
required:
- title
properties:
title:
type: string
description: Error title
source:
type: string
description: Field that has problem
detail:
type: string
description: Error detail
description: Error details
AuthTokenUnauthorizedErrors:
type: object
title: Errors
properties:
errors:
description: List of errors
type: array
items:
$ref: '#/components/schemas/Error'
example:
- detail: >-
Missing or invalid assertion. It must be a JWT signed with the
service account key
source: Authorization
title: Not authorized