From f5030933efe7c8924b33610e681a2b1026e92e30 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Wed, 9 Oct 2019 23:40:27 +0200 Subject: [PATCH] add openApi for sso and change password --- src/main/resources/openApi.yaml | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/main/resources/openApi.yaml b/src/main/resources/openApi.yaml index 4621585..6479deb 100644 --- a/src/main/resources/openApi.yaml +++ b/src/main/resources/openApi.yaml @@ -37,6 +37,34 @@ paths: text/plain: example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJBdXRoZW50aWNhdGlvbiIsImlzcyI6ImRjLXByb2plY3QuZnIiLCJpZCI6ImQ1NDRhNmE4LWJhYjgtNDU2MC05NWIxLThhZjAyMDNkOTEwNCIsImV4cCI6MTU2NzA3Mzc0Mn0.0VTetv8fZFjVgpJ-bwJpidGNHJUOmgj8vuZcZXzwnLa7TtFwcXWvh3bDPYHqB66nmOfXyM57XnHDbmRwtipCag + /sso: + post: + summary: Send email with JWT + tags: + - authentification + operationId: sso + requestBody: + content: + application/json: + schema: + properties: + email: + type: string + format: email + description: email to send the token + example: + my.email@dc-project.fr + url: + type: string + description: url tu redirect with the token + example: + http://dc-project.fr/sso + + responses: + 204: + description: email send + 404: + description: no user with this email /citizens/current: get: @@ -107,6 +135,34 @@ paths: $ref: '#/components/schemas/VoteResponse' 404: description: Citizen not found + /citizens/{citizen}/password/change: + parameters: + - $ref: '#/components/parameters/citizen' + put: + security: + - JWTAuth: [] + summary: Change Citizen Password + tags: + - citizen + operationId: changePassword + requestBody: + required: true + content: + application/json: + schema: + properties: + password: + type: string + format: password + required: true + example: + qwerty + + responses: + 201: + description: Password changed + 404: + description: Citizen not found /citizens: get: @@ -763,6 +819,11 @@ components: type: string example: 1984-12-25 + email: + type: string + format: email + example: + my.email@dc-project.fr CitizenRequest: allOf: - $ref: '#/components/schemas/CitizenBase'