You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Utilize @AuthenticationPrincipal to access logged-in user details, including userId, email, username, and authorities.
Response Body:
ApplicationResponse: Contains a descriptive message along with the affected userId.
Validations:
Username should be unique
Automatic extraction of logged-in user data via @AuthenticationPrincipal.
Username constraints: Max 16 characters, no special characters at the beginning, only "-" and "_" allowed as special characters, and numbers permitted.
Convert the username to lowercase.
Exception Handling
Throw BadRequest or any other exception with proper exception code in it. Please message for the error in error-messages.properties file present in resources directory.
Add message in front of that particular error code
Error codes should be sequential and starts with DE which depicts Data Error
The text was updated successfully, but these errors were encountered:
rohit-zip
changed the title
(Development) : Implementa API Endpoint to allow users to add username
(Development) : Implement an API Endpoint to allow users to add username
May 22, 2024
Hi @rohit-zip, I see the targetController has a RequestMapping path "/auth-provider/user-auth/read" already adding a post method with "/auth-provider/user/add-username" endpoint would be redundant I think.
Suggestion:- Either the RequestMapping could be modified to EndpointConstants.CONTEXT_PATH and the "/user-auth/read" can be appended specifically to the Get methods only.
Issue Description
Rules:
Endpoint:
Request Param:
Note:
Utilize
@AuthenticationPrincipal
to access logged-in user details, including userId, email, username, and authorities.Response Body:
Validations:
@AuthenticationPrincipal
.Exception Handling
resources
directory.Contact:
For further assistance, please reach out:
The text was updated successfully, but these errors were encountered: