You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
Add a setPassword
GraphQL mutation for setting a user's password (#2820)
* Feed `PasswordManager` through to the GraphQL `State` * Add `setPassword` GraphQL mutation to update a user's password
This commit is contained in:
@@ -198,6 +198,7 @@ impl TestState {
|
||||
site_config: site_config.clone(),
|
||||
rng: Arc::clone(&rng),
|
||||
clock: Arc::clone(&clock),
|
||||
password_manager: password_manager.clone(),
|
||||
};
|
||||
let state: crate::graphql::BoxState = Box::new(graphql_state);
|
||||
|
||||
@@ -314,6 +315,7 @@ struct TestGraphQLState {
|
||||
policy_factory: Arc<PolicyFactory>,
|
||||
clock: Arc<MockClock>,
|
||||
rng: Arc<Mutex<ChaChaRng>>,
|
||||
password_manager: PasswordManager,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
@@ -332,6 +334,10 @@ impl graphql::State for TestGraphQLState {
|
||||
self.policy_factory.instantiate().await
|
||||
}
|
||||
|
||||
fn password_manager(&self) -> PasswordManager {
|
||||
self.password_manager.clone()
|
||||
}
|
||||
|
||||
fn homeserver_connection(&self) -> &dyn HomeserverConnection<Error = anyhow::Error> {
|
||||
&self.homeserver_connection
|
||||
}
|
||||
|
Reference in New Issue
Block a user