Class UserAPI
This class holds static final strings that define the paths for user-related API endpoints, such as signing up a user, logging in a user, and others. These constants are used across the application to avoid hardcoding the paths and ensure consistency in the API structure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe base path for all user-related API endpoints.static final StringThe path for the refresh token endpoint.static final StringThe path for the user list retrieval endpoint.static final StringThe path for the user login endpoint.static final StringThe path for the user logout endpoint.static final StringThe path for the user sign-up endpoint.static final StringThe path for the user update endpoint. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BASE_PATH
The base path for all user-related API endpoints.This is the root URL for the user API endpoints. All user-related paths will be prefixed with this value, such as "/api/user/{role}/sign-up" or "/api/user/login".
- See Also:
-
USER_SIGN_UP
The path for the user sign-up endpoint.This endpoint allows users to sign up. The path includes a placeholder for the role of the user, which will be dynamically replaced when making the request (e.g., "/api/user/admin/sign-up").
- See Also:
-
USER_LOGIN
The path for the user login endpoint.This endpoint allows users to log in. The path is static, as it does not require any dynamic placeholders.
- See Also:
-
REFRESH_TOKEN
The path for the refresh token endpoint.This endpoint is used to obtain a new access token by presenting a valid refresh token. It helps maintain user sessions without requiring re‑authentication.
- See Also:
-
USER_LOGOUT
The path for the user logout endpoint.This endpoint invalidates the user's refresh token and ends the session. After logout, the user cannot use the old refresh token to obtain new access tokens.
- See Also:
-
USER_LIST
The path for the user list retrieval endpoint.This endpoint returns a paginated list of users. The path is static and does not include any dynamic parameters or placeholders.
- See Also:
-
USER_UPDATE
The path for the user update endpoint.This endpoint is used to update user details. It includes a dynamic path parameter
{id}, which should be replaced with the unique identifier of the user to be updated.- See Also:
-
-
Constructor Details
-
UserAPI
public UserAPI()
-