@@ -109,4 +109,33 @@ pub trait ForestAuth: Send + Sync {
|
||||
access_token: &str,
|
||||
token_id: &str,
|
||||
) -> Result<(), AuthError>;
|
||||
|
||||
async fn update_username(
|
||||
&self,
|
||||
access_token: &str,
|
||||
user_id: &str,
|
||||
new_username: &str,
|
||||
) -> Result<User, AuthError>;
|
||||
|
||||
async fn change_password(
|
||||
&self,
|
||||
access_token: &str,
|
||||
user_id: &str,
|
||||
current_password: &str,
|
||||
new_password: &str,
|
||||
) -> Result<(), AuthError>;
|
||||
|
||||
async fn add_email(
|
||||
&self,
|
||||
access_token: &str,
|
||||
user_id: &str,
|
||||
email: &str,
|
||||
) -> Result<UserEmail, AuthError>;
|
||||
|
||||
async fn remove_email(
|
||||
&self,
|
||||
access_token: &str,
|
||||
user_id: &str,
|
||||
email: &str,
|
||||
) -> Result<(), AuthError>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user