-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HAI-1873 Add API for identifying a user
Add an endpoint that takes a user token in the request body and creates a permission for the user to the hanke the token is associated with. The token is deleted from DB after use, since it can't be used again anyway. The motivation is to activate the permissions that have been created for a contact person. When creating a contact person we don't know which user the contact person is, so we create a user token, that's emailed to the contact. The contact can then use this endpoint (through UI) to activate the given permission, i.e. change the token placeholder to an actual permission. As an unreleated change, configure springdoc to use application/json as the default for all API descriptions. This way, we don't have to specify the media type for every single response, including all the error responses. Also, configure springdoc to use a reference for the HankeError enum, so the definition isn't copied for each error response in the OpenAPI JSON. This cut down the size of the JSON file to about half.
- Loading branch information
Showing
9 changed files
with
357 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.