用户身份认证
This endpoint authenticates users by verifying their credentials and creates a new session. Upon successful authentication, it returns user information and sets a secure HTTP-only cookie for session management. The session includes IP address and user agent tracking for security purposes.
请求体
usernamestring必填
passwordstring必填
响应
200
Response for status 200
application/json
401
Response for status 401
application/json
post
/auth/sessionThis endpoint logs out the current user by deactivating their session and removing the session cookie. It requires an active session cookie to be present in the request. After successful logout, the session is invalidated and cannot be used again.
响应
200
Response for status 200
application/json
401
Response for status 401
application/json
delete
/auth/session最后更新于
这有帮助吗?