Endpoint
Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.Request
Headers
Bearer token for authenticationExample:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Must be
application/jsonBody Parameters
User’s current password for verificationRequired for security purposes to confirm the user’s identity
The new password
- Minimum length: 8 characters
- Must meet password strength requirements
- Cannot be the same as common passwords
Response
Indicates if the request was successful
Success message: “Senha alterada com sucesso! Por segurança, você foi deslogado de outros dispositivos.”
Example
Response
Error Responses
400 Bad Request - Password Too Short
400 Bad Request - Weak Password
401 Unauthorized - Invalid Current Password
401 Unauthorized - Invalid Token
404 Not Found
Security Features
Password Strength Validation
The new password must meet the following requirements:- Minimum 8 characters
- Include uppercase letters
- Include lowercase letters
- Include numbers
- Include special characters
- Not be a commonly used password
Session Revocation
For security purposes, changing your password will:- Revoke all refresh tokens - All active sessions on other devices will be terminated
- Keep your current session active - You won’t be logged out from the current device
- Require re-login on other devices - Users will need to sign in again on all other devices
Security Logging
Password changes are logged in the activity log for audit purposes, including:- Timestamp of the change
- User information
- IP address and device information (if available)
Best Practices
- Use a strong, unique password - Don’t reuse passwords from other services
- Update regularly - Consider changing your password periodically
- Don’t share your password - Never share your password with anyone
- Use a password manager - Consider using a password manager to generate and store secure passwords
- Enable two-factor authentication - If available, enable 2FA for additional security