You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Run the registration policy on upstream OAuth registration
This commit is contained in:
29
policies/password_test.rego
Normal file
29
policies/password_test.rego
Normal file
@ -0,0 +1,29 @@
|
||||
package password
|
||||
|
||||
test_password_require_number {
|
||||
allow with data.passwords.require_number as true
|
||||
|
||||
not allow with input.password as "hunter"
|
||||
with data.passwords.require_number as true
|
||||
}
|
||||
|
||||
test_password_require_lowercase {
|
||||
allow with data.passwords.require_lowercase as true
|
||||
|
||||
not allow with input.password as "HUNTER2"
|
||||
with data.passwords.require_lowercase as true
|
||||
}
|
||||
|
||||
test_password_require_uppercase {
|
||||
allow with data.passwords.require_uppercase as true
|
||||
|
||||
not allow with input.password as "hunter2"
|
||||
with data.passwords.require_uppercase as true
|
||||
}
|
||||
|
||||
test_password_min_length {
|
||||
allow with data.passwords.min_length as 6
|
||||
|
||||
not allow with input.password as "short"
|
||||
with data.passwords.min_length as 6
|
||||
}
|
Reference in New Issue
Block a user