diff --git a/Cargo.toml b/Cargo.toml index c7cab52..8be0009 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ async-trait = "0.1.40" hex-literal = "0.3.1" once_cell = "1.4.1" getrandom = "0.2.0" -#serde_json = "1.0.57" # serde not suitable for our text formatting :/ maybe just use `cbor` -> base64 with text header? would be a PEM-like format. sounds good imo [build-dependencies] rustc_version = "0.2" +config_struct = "0.5.0" \ No newline at end of file diff --git a/config/password.toml b/config/password.toml new file mode 100644 index 0000000..02c3fb1 --- /dev/null +++ b/config/password.toml @@ -0,0 +1,15 @@ +[password] +length = 3 +message = "Not a safe password" + +[[password.deny]] +message = "Password too alphanumeric" +value = ["^[A-z]+$"] +type = "regex" +case-sensitive = false + +[[password.allow]] +warn = true +message = "Empty string password" +value = [""] +type = "exact" \ No newline at end of file