forked from pagopa/io-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_public.yaml
206 lines (204 loc) · 5.24 KB
/
api_public.yaml
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
205
206
swagger: "2.0"
info:
version: 1.0.0
title: Public API
description: Mobile and web proxy API gateway.
host: localhost
basePath: /
schemes:
- https
paths:
"/info":
x-swagger-router-controller: ServerInfoController
get:
operationId: getServerInfo
summary: Runtime server info
description: >
Returns runtime information about the server.
responses:
"200":
description: Runtime server info.
schema:
$ref: "#/definitions/ServerInfo"
examples:
application/json:
version: "0.0.1"
min_app_version: "0.0.0"
min_app_version_pagopa: "0.0.0"
"/test-login":
x-swagger-router-controller: AuthenticationController
post:
operationId: testLogin
summary: Login Test User with password
description: Login Test User with password and Fiscal Code
parameters:
- in: body
name: body
schema:
$ref: "#/definitions/PasswordLogin"
required: true
x-examples:
application/json:
username: AAABBB01C02D345Z
password: secret
- $ref: "#/parameters/JwkPubKeyToken"
- $ref: "#/parameters/JwkPubKeyHashAlgorithm"
- $ref: "#/parameters/LoginType"
responses:
"200":
description: Access token
schema:
$ref: "#/definitions/AccessToken"
"401":
description: Invalid credentials
"500":
description: Unavailable service
schema:
$ref: "#/definitions/ProblemJson"
"/login":
get:
operationId: login
summary: Login SPID/CIE
description: Login with SPID or CIE for IO APP
parameters:
- $ref: "#/parameters/EntityId"
- $ref: "#/parameters/AuthLevel"
- $ref: "#/parameters/JwkPubKeyToken"
- $ref: "#/parameters/JwkPubKeyHashAlgorithm"
- $ref: "#/parameters/LoginType"
responses:
"302":
description: Redirect to IDP
headers:
Location:
type: string
description: Redirect endpoint with SAML AuthNRequest query parameters
"400":
description: Bad Request
schema:
$ref: "#/definitions/ProblemJson"
"500":
description: Internal Server Error
schema:
$ref: "#/definitions/ProblemJson"
"503":
description: Service unavailable
"/assertionConsumerService":
post:
operationId: acs
summary: ACS step of Login SPID/CIE
description: Login with SPID or CIE for IO APP
parameters:
- in: body
name: body
schema:
$ref: "#/definitions/SAMLResponse"
responses:
"301":
description: Redirect to home page
headers:
Location:
type: string
"500":
description: Internal Server Error
schema:
$ref: "#/definitions/ProblemJson"
definitions:
FiscalCode:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-commons/v5.0.0/openapi/definitions.yaml#/FiscalCode"
ProblemJson:
$ref: "https://raw.githubusercontent.com/pagopa/io-functions-commons/v5.0.0/openapi/definitions.yaml#/ProblemJson"
ServerInfo:
type: object
title: Server information
properties:
version:
type: string
min_app_version:
$ref: "#/definitions/VersionPerPlatform"
min_app_version_pagopa:
$ref: "#/definitions/VersionPerPlatform"
required:
- version
- min_app_version
- min_app_version_pagopa
VersionPerPlatform:
type: object
title: Specify a version for ios and another for android
properties:
ios:
type: string
android:
type: string
required:
- ios
- android
PasswordLogin:
type: object
properties:
username:
$ref: "#/definitions/FiscalCode"
password:
type: string
minLength: 1
required:
- username
- password
AccessToken:
type: object
properties:
token:
type: string
minLength: 1
required:
- token
SAMLResponse:
type: string
description: A string representation of a signed SPID/CIE response
minLength: 1
consumes:
- application/json
produces:
- application/json
parameters:
EntityId:
name: entityID
in: query
type: string
enum:
- lepidaid
- infocertid
- sielteid
- namirialid
- timid
- arubaid
- posteid
- spiditalia
- teamsystemid
- ehtid
- infocamereid
- intesiid
- xx_servizicie_coll
- xx_servizicie
- xx_servizicie_test
description: An ID that refers to a specific IDP
required: true
AuthLevel:
name: authLevel
in: query
type: string
enum: [SpidL2, SpidL3]
description: SPID AuthLevel
required: true
x-example: SpidL2
LoginType:
name: loginType
in: header
type: string
enum: [LV, LEGACY]
required: false
x-example: LEGACY
JwkPubKeyToken:
$ref: "./api_lollipop.yaml#/parameters/JwkPubKeyToken"
JwkPubKeyHashAlgorithm:
$ref: "./api_lollipop.yaml#/parameters/JwkPubKeyHashAlgorithm"