Welcome to our Authentication Endpoints Guide! Below are the main endpoints for user authentication in our platform:
/auth/register
Purpose: Register a new user.
Method: POST
Parameters:
username
email
password
Response:
200 OK
: User registered successfully.400 Bad Request
: Invalid input data.
/auth/login
Purpose: Log in a user.
Method: POST
Parameters:
username
oremail
password
Response:
200 OK
: User logged in successfully.401 Unauthorized
: Invalid credentials.
/auth/logout
Purpose: Log out a user.
Method: POST
Parameters: None (authentication token passed via headers)
Response:
200 OK
: User logged out successfully.401 Unauthorized
: Invalid token.
/auth/reset-password
Purpose: Reset user password.
Method: POST
Parameters:
email
Response:
200 OK
: Password reset instructions sent.404 Not Found
: Email not found.
/auth/change-password
Purpose: Change user password.
Method: PUT
Parameters:
oldPassword
newPassword
Response:
200 OK
: Password changed successfully.401 Unauthorized
: Invalid token or old password.400 Bad Request
: Invalid input data.
/auth/refresh-token
Purpose: Refresh authentication token.
Method: POST
Parameters: None (authentication token passed via headers)
Response:
200 OK
: Token refreshed successfully.401 Unauthorized
: Invalid token.