1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

policies: split the email & password policies and add jsonschema validation of the input

This commit is contained in:
Quentin Gliech
2023-08-30 15:01:37 +02:00
parent 6589f06d79
commit 23151ef092
25 changed files with 547 additions and 164 deletions

View File

@@ -117,14 +117,15 @@ impl TestState {
let file =
tokio::fs::File::open(workspace_root.join("policies").join("policy.wasm")).await?;
let policy_factory = PolicyFactory::load(
file,
serde_json::json!({}),
"register/violation".to_owned(),
"client_registration/violation".to_owned(),
"authorization_grant/violation".to_owned(),
)
.await?;
let entrypoints = mas_policy::Entrypoints {
register: "register/violation".to_owned(),
client_registration: "client_registration/violation".to_owned(),
authorization_grant: "authorization_grant/violation".to_owned(),
email: "email/violation".to_owned(),
password: "password/violation".to_owned(),
};
let policy_factory = PolicyFactory::load(file, serde_json::json!({}), entrypoints).await?;
let homeserver_connection = MockHomeserverConnection::new("example.com");