signin is modified
This commit is contained in:
parent
388a8ef177
commit
d0c55c838a
|
@ -766,6 +766,24 @@ impl Service<'_> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
match m.state {
|
||||||
|
repositories::member::schema::MemberState::Normal => {}
|
||||||
|
_ => {
|
||||||
|
return Err(bcr::error::rpc::Error::InvalidParams(
|
||||||
|
bcr::error::rpc::InvalidParams {
|
||||||
|
message: "not permitted username".to_string(),
|
||||||
|
detail: bcr::error::rpc::InvalidParamsDetail {
|
||||||
|
location: "request".to_string(),
|
||||||
|
param: "username".to_string(),
|
||||||
|
value: username,
|
||||||
|
error_type: bcr::error::rpc::InvalidParamsType::None,
|
||||||
|
message: "cannot signin".to_string(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !(argon2::verify_encoded(&m.password, password.as_bytes()).map_err(|e| {
|
if !(argon2::verify_encoded(&m.password, password.as_bytes()).map_err(|e| {
|
||||||
bcr::error::rpc::Error::InvalidParams(bcr::error::rpc::InvalidParams {
|
bcr::error::rpc::Error::InvalidParams(bcr::error::rpc::InvalidParams {
|
||||||
message: "invalid password".to_string(),
|
message: "invalid password".to_string(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user