AuthResource class

Constructors

AuthResource(APIHttpClient httpClient)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
httpClient → APIHttpClient
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createUser({required String username, required String password, required String email, String? avatarStorageUUID}) Future<CreateUserResult>
Create a user account, if successful, will return token and user information.
getToken({required String uuid, required String password}) Future<String>
透過密碼與 uuid,取得使用者的 token
getUserByEmail(String email) Future<User>
Get user info by email.
getUserByUUID(String uuid, {String? token}) Future<User>
Get user info by uuid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateUser({required String uuid, String? token, String? password, String? newUsername, String? newPassword, String? newEmail, String? newAvatarStorageUUID}) Future<User>
更新使用者資訊,如果成功則回傳修改後的使用者資訊,如果未提供 password 則需要提供 token
validAuthCode({required String email, required int code}) Future<bool>
validPassword(String password) Future<PasswordValidatedResult>
驗證密碼格式

Operators

operator ==(Object other) bool
The equality operator.
inherited