From d0c55c838a0308f1066b30a3a6ba3c52e3645473 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Mon, 29 Aug 2022 05:17:57 +0000 Subject: [PATCH] signin is modified --- src/services/identity/service.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/services/identity/service.rs b/src/services/identity/service.rs index 83f461c..223bd67 100644 --- a/src/services/identity/service.rs +++ b/src/services/identity/service.rs @@ -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| { bcr::error::rpc::Error::InvalidParams(bcr::error::rpc::InvalidParams { message: "invalid password".to_string(),