# Auth - 权限 > url 前缀:**auth** > > 示例:**https://xxxxxxxxx/api/auth/xxxx** ## 获得当前登录用户的信息 ```http get /current ``` ### Response ```ts interface UserData { err: 0 | 401 /* 用户信息失效 */; res: UserSerializer; } ``` see [UserSerializer](../serializer/UserSerializer.md) ## 更新当前登录用户的手机号信息 ```http put /current/phone ``` ### Parameters ```ts interface UpdatePhoneDTO { phone: string; token: string; // 验证码 } ``` ### Response ```ts interface UserData { err: 0; res: UserSerializer; } ``` ## 更新当前用户的信息 ```http put /current ``` ### Parameters ```ts interface UpdateEmailDTO { name: string; email: string; } ``` ### Response ```ts interface UserData { err: 0; res: UserSerializer; } ``` see [UserSerializer](../serializer/UserSerializer.md) ## 登录 ```http post /login ``` ### Parameters ```ts interface loginDTO { username: string; password: string; } ``` ### Response ```ts interface UserData { err: 0 | 403 /* 用户名密码错 */; res: UserSerializer; } ``` see [UserSerializer](../serializer/UserSerializer.md) ## 手机验证码 ```http post /verification ``` ### Parameters ```ts interface VerficationDTO { phoneNumber: string; } ``` ## 修改密码 `STUDENT` `TEACHER` ```http post /password/change ``` ### Parameters ```ts interface ChangePasswordForm { origin: string; password: string; confirm: string; } ``` ### Response ```ts interface EmptyData { err: 0; } ``` ## 注册 ```http post /register ``` ### Parameters ```ts interface RegisterDTO { name: string; // 用户真实姓名 username: string; password: string; phoneNumber: string; token: string; email: string; } ``` ### Response ```ts interface UserData { err: 0 | 400; res: UserSerializer; } ``` see [UserSerializer](../serializer/UserSerializer.md) ## 修改密码 `STUDENT` `TEACHER` ```http post /password/change ``` ### Parameters ```ts interface ChangePasswordForm { origin: string; password: string; confirm: string; } ``` ### Response ```ts interface EmptyData { err: 0; } ``` ## 找回密码 `STUDENT` `TEACHER` ```http post /password/new ``` ### Parameters ```ts interface FindPasswordForm { phoneNumber: string; token: string; newPassword: string; } ``` ### Response ```ts interface EmptyData { err: 0; } ```