Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add module for validating password * Change the structure of PasswordPolicy * Add maximum password length policy * Add test for valid password * Add test for validating invalid password * Add haddock comments * Move Arbitrary instances to test module * Rename PasswordPolicy field, valid * Use RecordWildCards, add backlash as special character * Add test for defaultCharacterSet * Remove charSet field from PasswordPolicy, introduce CharSetPredicate * Apply changes based upon the comments * Add function validateCharSetPredicate, introduce more test cases * Remove maybe, edit haddock comments * Introduce InvalidPolicyReason * Some code adjustments. DRY-er and 'ValidationResult' hopefully makes for a nicer API * Added @SInCE footers and made some tweaks to comments/documentation * small fix * adjusted tests for new structure and added some unit tests * makes sure the tests also compile * some comment adjustments * added charSetPredicate to PasswordPolicy * use type synonyms for the Invalid*Reasons and a few documentation tweaks * Added 'ValidPasswordPolicy' type to mark an already checked PasswordPolicy * exports and comments adjustments * fixed tests to work with new way of validating policies * added 2.1.0.0 entry to ChangeLog.md * some more comment adjustments * upped version in 'password.cabal' * changed 'unValidatePasswordPolicy' to 'fromValidPasswordPolicy' and added Ord instance and documentation to 'ValidPasswordPolicy * added enough documentation for a new user to get an idea in how to use this API * added hie.yaml and linted a bit with HLS * thought of a different way a policy can be invalid (CategoryAmountsAboveMaxLength) * added 'testPolicy' for a TH consistency check * added 'validatePasswordPolicyTH' to get 'ValidPasswordPolicy's at compile time, with a caveat (can't set 'charSetPredicate') * added 'CategoryAmountAboveMaxLength' to tests and added TemplateHaskell tests to guarantee consistency * update ALL the documentation (and export allButCSP for tests) * added an extra regression test to make sure testPolicy isn't compromised * updated Changelog to indicate I worked on this too Co-authored-by: Hiroto Shioi <[email protected]>
- Loading branch information