-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
testIssues related to tests, test coverage, or test infrastructureIssues related to tests, test coverage, or test infrastructuretest:synkronusTest case related to Synkronus and PortalTest case related to Synkronus and Portal
Description
Description
Verifies that the login endpoint accepts valid credentials, returns a properly structured JWT token and refresh token, and that the issued token can be used to authenticate subsequent API requests.
Steps
- Ensure the Synkronus server is running and the admin user exists
- Send a POST request to
/auth/loginwith a valid username and password:{ "username": "admin", "password": "your-password" } - Inspect the response body - verify it contains the fields
token,refreshToken, andexpiresAt - Note the value of
expiresAt- confirm it is a future timestamp - Copy the
tokenvalue - Send a GET request to
/usersusing the token as a Bearer header:
Authorization: Bearer <token> - Verify the response is
200 OKand returns the users list - Attempt the same
/usersrequest with a deliberately malformed token (e.g. change one character) - Verify the response is
401 Unauthorized
Expected Result
A valid login returns 200 OK with token, refreshToken, and expiresAt in the response body. The issued token successfully authenticates the /users endpoint. A malformed token is rejected with 401. No passwords or secrets appear in the response body.
Actual Result
(To be filled during testing)
Priority
High
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testIssues related to tests, test coverage, or test infrastructureIssues related to tests, test coverage, or test infrastructuretest:synkronusTest case related to Synkronus and PortalTest case related to Synkronus and Portal