feat: support http basic authentication (#733)

* feat: support http auth

* add some unit test and log

* fix

* cr

* remove unused #[derive(Clone)]
This commit is contained in:
fys
2022-12-13 10:44:33 +08:00
committed by GitHub
parent 9b093463cc
commit c5661ee362
13 changed files with 409 additions and 73 deletions

View File

@@ -67,9 +67,13 @@ pub enum StatusCode {
/// User not exist
UserNotFound = 7000,
/// Unsupported password type
UnsupportedPwdType = 7001,
UnsupportedPasswordType = 7001,
/// Username and password does not match
UserPwdMismatch = 7002,
UserPasswordMismatch = 7002,
/// Not found http authorization header
AuthHeaderNotFound = 7003,
/// Invalid http authorization header
InvalidAuthHeader = 7004,
// ====== End of auth related status code =====
}