source: TFP-WebServer/WebServer/src/UrlHandlers/SessionHandler.openapi.yaml@ 463

Last change on this file since 463 was 463, checked in by alloc, 15 months ago

21.1.16.0 release
Completed OpenAPI specs
Add support to path handlers to register OpenAPI specs
Fixed ItemIconHandler throwing error when requested path contains no dot

File size: 3.1 KB
Line 
1openapi: 3.1.0
2info:
3 title: SessionHandler
4 version: '1'
5
6components:
7 requestBodies:
8 SessionLoginBodyIn:
9 content:
10 application/json:
11 schema:
12 type: object
13 properties:
14 username:
15 type: string
16 password:
17 type: string
18 format: password
19 required:
20 - username
21 - password
22 required: true
23
24
25paths:
26 /BASEPATH/login:
27 post:
28 tags:
29 - Session
30 summary: Login with web username
31 description: Try logging in with a web username/password combination created with the 'createwebuser' command.
32 operationId: SessionHandler.get.login
33 requestBody:
34 $ref: '#/components/requestBodies/SessionLoginBodyIn'
35 responses:
36 200:
37 description: Login succeeded, SessionID cookie will be set
38 content:
39 plain/text:
40 schema:
41 type: string
42 const: ''
43 400:
44 description: Invalid request
45 content:
46 plain/text:
47 schema:
48 type: string
49 enum:
50 - 'NoLoginData'
51 - 'InvalidLoginJson'
52 401:
53 description: Login failed
54 content:
55 plain/text:
56 schema:
57 type: string
58 const: 'UserPassInvalid'
59 500:
60 description: Internal error during login
61 content:
62 plain/text:
63 schema:
64 type: string
65 const: 'LoginError'
66
67 /BASEPATH/logout:
68 get:
69 tags:
70 - Session
71 summary: Logout
72 description: Log out from
73 operationId: SessionHandler.get.logout
74 responses:
75 302:
76 description: Logged out, redirect to page base
77 headers:
78 Location:
79 description: Page base URL
80 schema:
81 type: string
82 const: '/app'
83
84 /BASEPATH/loginsteam:
85 get:
86 tags:
87 - Session
88 summary: Login with Steam
89 description: Log in with Steam's OpenID service
90 operationId: SessionHandler.get.loginsteam
91 responses:
92 302:
93 description: Redirect to Steam's OpenID page
94 headers:
95 Location:
96 description: Steam OpenID URL
97 schema:
98 type: string
99
100 /BASEPATH/verifysteamopenid:
101 get:
102 tags:
103 - Session
104 summary: Login with Steam - Verification
105 description: Callback from Steam's OpenID service, verifying the login result
106 operationId: SessionHandler.get.verifysteamopenid
107 responses:
108 302:
109 description: Redirect to page base or error page
110 headers:
111 Location:
112 description: Page base URL or error page
113 schema:
114 type: string
115 enum:
116 - '/app'
117 - '/app/error/SteamLoginFailed'
Note: See TracBrowser for help on using the repository browser.