diff --git a/backend/openapi/components/requestBodies/internal/change-password-request.yaml b/backend/openapi/components/requestBodies/internal/change-password-request.yaml new file mode 100644 index 0000000..ba02ae8 --- /dev/null +++ b/backend/openapi/components/requestBodies/internal/change-password-request.yaml @@ -0,0 +1,10 @@ +description: New password +required: true +content: + application/json: + schema: + type: object + properties: + secret: + type: newPassword + description: The new password for the user. diff --git a/backend/openapi/components/responses/internal/success-change-password.yaml b/backend/openapi/components/responses/internal/success-change-password.yaml new file mode 100644 index 0000000..c254051 --- /dev/null +++ b/backend/openapi/components/responses/internal/success-change-password.yaml @@ -0,0 +1,9 @@ +description: Successfully changed user password +content: + application/json: + schema: + type: object + properties: + message: + type: string + example: 'Password changed successfully' diff --git a/backend/openapi/openvidu-meet-internal-api.yaml b/backend/openapi/openvidu-meet-internal-api.yaml index 589f80c..8146c7c 100644 --- a/backend/openapi/openvidu-meet-internal-api.yaml +++ b/backend/openapi/openvidu-meet-internal-api.yaml @@ -14,8 +14,10 @@ paths: $ref: './paths/internal/auth.yaml#/~1auth~1logout' /auth/refresh: $ref: './paths/internal/auth.yaml#/~1auth~1refresh' - /auth/profile: - $ref: './paths/internal/auth.yaml#/~1auth~1profile' + /users/profile: + $ref: './paths/internal/users.yaml#/~1users~1profile' + /users/change-password: + $ref: './paths/internal/users.yaml#/~1users~1change-password' /preferences/webhooks: $ref: './paths/internal/global-preferences.yaml#/~1preferences~1webhooks' /preferences/security: diff --git a/backend/openapi/paths/internal/auth.yaml b/backend/openapi/paths/internal/auth.yaml index 5ef97c7..bf7571c 100644 --- a/backend/openapi/paths/internal/auth.yaml +++ b/backend/openapi/paths/internal/auth.yaml @@ -63,18 +63,3 @@ $ref: '../../components/responses/internal/error-invalid-refresh-token.yaml' '500': $ref: '../../components/responses/internal-server-error.yaml' -/auth/profile: - get: - operationId: getUserProfile - summary: Get user profile - description: > - Retrieves the profile information of the authenticated user. - tags: - - Internal API - Authentication - security: - - accessTokenCookie: [] - responses: - '200': - $ref: '../../components/responses/internal/success-get-profile.yaml' - '401': - $ref: '../../components/responses/unauthorized-error.yaml' diff --git a/backend/openapi/paths/internal/users.yaml b/backend/openapi/paths/internal/users.yaml new file mode 100644 index 0000000..00d7f1d --- /dev/null +++ b/backend/openapi/paths/internal/users.yaml @@ -0,0 +1,36 @@ +/users/profile: + get: + operationId: getUserProfile + summary: Get user profile + description: > + Retrieves the profile information of the authenticated user. + tags: + - Internal API - Users + security: + - accessTokenCookie: [] + responses: + '200': + $ref: '../../components/responses/internal/success-get-profile.yaml' + '401': + $ref: '../../components/responses/unauthorized-error.yaml' +/users/change-password: + post: + operationId: changeUserPassword + summary: Change user password + description: > + Allows the authenticated user to change their password. + tags: + - Internal API - Users + security: + - accessTokenCookie: [] + requestBody: + $ref: '../../components/requestBodies/internal/change-password-request.yaml' + responses: + '200': + $ref: '../../components/responses/internal/success-change-password.yaml' + '401': + $ref: '../../components/responses/unauthorized-error.yaml' + '422': + $ref: '../../components/responses/validation-error.yaml' + '500': + $ref: '../../components/responses/internal-server-error.yaml' diff --git a/backend/openapi/tags/tags.yaml b/backend/openapi/tags/tags.yaml index 5533753..dcbb408 100644 --- a/backend/openapi/tags/tags.yaml +++ b/backend/openapi/tags/tags.yaml @@ -4,6 +4,8 @@ description: Operations related to managing OpenVidu Meet recordings - name: Internal API - Authentication description: Authentication operations +- name: Internal API - Users + description: Operations related to managing users in OpenVidu Meet - name: Internal API - Global Preferences description: Operations related to managing global preferences in OpenVidu Meet - name: Internal API - Rooms