Skip to content

Commit c2905b0

Browse files
authored
Merge pull request #242 from IntersectMBO/pre-prod
Pre prod to Main
2 parents c5d0509 + 65cb73a commit c2905b0

File tree

14 files changed

+666
-18
lines changed

14 files changed

+666
-18
lines changed

backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# path: ./Dockerfile
2-
FROM node:alpine
2+
FROM node:20-alpine
33
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
44
ARG NODE_ENV=production
55
ENV NODE_ENV=${NODE_ENV}

backend/config/plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = ({ env }) => ({
1616
config: {
1717
info: { version: "1.0.0" }, // Set the documentation version
1818
"x-strapi-config": {
19-
plugins: [], // Additional plugin configuration (currently empty)
19+
plugins: ["users-permissions"], // Additional plugin configuration (currently empty)
2020
},
2121
},
2222
},

backend/public/api-docs/api.yaml

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ info:
4040
4141
openapi: 3.0.0
4242
tags:
43+
- name: Authentication
44+
description: User authentication and authorization
45+
- name: Users
46+
description: User management operations
4347
- name: Proposal
4448
- name: Proposal vote
4549
- name: Comment
@@ -97,6 +101,8 @@ tags:
97101
x-tagGroups:
98102
- name: Endpoints
99103
tags:
104+
- Authentication
105+
- Users
100106
- Proposal
101107
- Proposal content
102108
- Proposal submition
@@ -108,6 +114,8 @@ x-tagGroups:
108114
- Wallet type
109115
- name: Models
110116
tags:
117+
- Authentication
118+
- Users
111119
- proposal_model
112120
- proposal_content_model
113121
- proposal_submition_model
@@ -152,6 +160,66 @@ components:
152160
type: string
153161
details:
154162
type: object
163+
AuthChallengeResponse:
164+
type: object
165+
properties:
166+
message:
167+
type: string
168+
AuthLocalRequest:
169+
type: object
170+
properties:
171+
identifier:
172+
type: string
173+
signedMessage:
174+
$ref: '#/components/schemas/SignedMessage'
175+
description: Signed message
176+
SignedMessage:
177+
type: object
178+
properties:
179+
key:
180+
type: string
181+
signature:
182+
type: string
183+
expectedSignedMessage:
184+
type: string
185+
AuthLocalResponse:
186+
type: object
187+
properties:
188+
status:
189+
type: string
190+
enum:
191+
- Authenticated
192+
- Failed
193+
- NotFound
194+
jwt:
195+
type: string
196+
user:
197+
$ref: '#/components/schemas/User'
198+
User:
199+
type: object
200+
properties:
201+
id:
202+
type: number | string
203+
username:
204+
type: string
205+
email:
206+
type: string
207+
provider:
208+
type: string
209+
confirmed:
210+
type: boolean
211+
blocked:
212+
type: boolean
213+
govtool_username:
214+
type: string
215+
createdAt:
216+
type: string
217+
format: date-time
218+
updatedAt:
219+
type: string
220+
format: date-time
221+
is_validated:
222+
type: boolean
155223
CommentRequest:
156224
type: object
157225
required:
@@ -1083,7 +1151,173 @@ components:
10831151
$ref: '#/components/schemas/WalletTypeResponseDataObject'
10841152
meta:
10851153
type: object
1154+
RefreshToken:
1155+
type: object
1156+
properties:
1157+
jwt:
1158+
type: string
1159+
refreshToken:
1160+
type: string
10861161
paths:
1162+
/auth/challenge:
1163+
get:
1164+
security:
1165+
- none: []
1166+
responses:
1167+
'200':
1168+
description: OK
1169+
content:
1170+
application/json:
1171+
schema:
1172+
$ref: '#/components/schemas/AuthChallengeResponse'
1173+
'400':
1174+
description: Bad Request
1175+
content:
1176+
application/json:
1177+
schema:
1178+
$ref: '#/components/schemas/Error'
1179+
tags:
1180+
- Authentication
1181+
parameters:
1182+
- name: identifier
1183+
in: query
1184+
description: Identifier
1185+
deprecated: false
1186+
required: true
1187+
schema:
1188+
type: string
1189+
operationId: get/auth/challenge
1190+
summary: Get authentication challenge
1191+
description: |
1192+
Get authentication challenge
1193+
/auth/local:
1194+
post:
1195+
security:
1196+
- none: []
1197+
responses:
1198+
'200':
1199+
description: OK
1200+
content:
1201+
application/json:
1202+
schema:
1203+
$ref: '#/components/schemas/AuthLocalResponse'
1204+
'400':
1205+
description: Bad Request
1206+
content:
1207+
application/json:
1208+
schema:
1209+
$ref: '#/components/schemas/Error'
1210+
'401':
1211+
description: Unauthorized
1212+
content:
1213+
application/json:
1214+
schema:
1215+
$ref: '#/components/schemas/Error'
1216+
'403':
1217+
description: Forbidden
1218+
content:
1219+
application/json:
1220+
schema:
1221+
$ref: '#/components/schemas/Error'
1222+
tags:
1223+
- Authentication
1224+
parameters: []
1225+
operationId: post/auth/local
1226+
requestBody:
1227+
required: true
1228+
content:
1229+
application/json:
1230+
schema:
1231+
$ref: '#/components/schemas/AuthLocalRequest'
1232+
summary: Login
1233+
/token/refresh:
1234+
post:
1235+
responses:
1236+
'200':
1237+
description: OK
1238+
content:
1239+
application/json:
1240+
schema:
1241+
$ref: '#/components/schemas/RefreshToken'
1242+
'400':
1243+
description: Bad Request
1244+
content:
1245+
application/json:
1246+
schema:
1247+
$ref: '#/components/schemas/Error'
1248+
'401':
1249+
description: Unauthorized
1250+
content:
1251+
application/json:
1252+
schema:
1253+
$ref: '#/components/schemas/Error'
1254+
'403':
1255+
description: Forbidden
1256+
content:
1257+
application/json:
1258+
schema:
1259+
$ref: '#/components/schemas/Error'
1260+
tags:
1261+
- Authentication
1262+
parameters: []
1263+
operationId: post/token/refresh
1264+
requestBody:
1265+
required: true
1266+
content:
1267+
application/json:
1268+
schema:
1269+
$ref: '#/components/schemas/RefreshToken'
1270+
summary: Refresh token
1271+
/users/{id}:
1272+
put:
1273+
responses:
1274+
'200':
1275+
description: OK
1276+
content:
1277+
application/json:
1278+
schema:
1279+
$ref: '#/components/schemas/User'
1280+
'400':
1281+
description: Bad Request
1282+
content:
1283+
application/json:
1284+
schema:
1285+
$ref: '#/components/schemas/Error'
1286+
'401':
1287+
description: Unauthorized
1288+
content:
1289+
application/json:
1290+
schema:
1291+
$ref: '#/components/schemas/Error'
1292+
'403':
1293+
description: Forbidden
1294+
content:
1295+
application/json:
1296+
schema:
1297+
$ref: '#/components/schemas/Error'
1298+
'404':
1299+
description: Not Found
1300+
content:
1301+
application/json:
1302+
schema:
1303+
$ref: '#/components/schemas/Error'
1304+
tags:
1305+
- Users
1306+
parameters:
1307+
- name: id
1308+
in: path
1309+
description: ''
1310+
deprecated: false
1311+
required: true
1312+
schema:
1313+
type: number
1314+
operationId: Update user
1315+
requestBody:
1316+
required: true
1317+
content:
1318+
application/json:
1319+
schema:
1320+
$ref: '#/components/schemas/User'
10871321
/comments:
10881322
get:
10891323
responses:

0 commit comments

Comments
 (0)