diff --git a/src/c2se/backend/identity.rs b/src/c2se/backend/identity.rs index a0f45cc..34360d2 100644 --- a/src/c2se/backend/identity.rs +++ b/src/c2se/backend/identity.rs @@ -2,17 +2,27 @@ use crate::protobuf::rpc; const SUBJECT: &str = "bet.beteran.c2se.backend.identity"; +pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); +/// subject = bet.beteran.c2se.backend.identity.Captcha +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub image: ::core::option::Option<::prost::alloc::string::String>, +} + pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); /// subject = bet.beteran.c2se.backend.identity.Signin #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigninRequest { #[prost(string, tag = "1")] - pub site_url: ::prost::alloc::string::String, - #[prost(string, tag = "2")] pub username: ::prost::alloc::string::String, - #[prost(string, tag = "3")] + #[prost(string, tag = "2")] pub password: ::prost::alloc::string::String, - #[prost(string, tag = "4")] + #[prost(string, tag = "3")] pub security_code: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/c2se/core/mod.rs b/src/c2se/core/mod.rs new file mode 100644 index 0000000..a61610b --- /dev/null +++ b/src/c2se/core/mod.rs @@ -0,0 +1 @@ +pub mod network; diff --git a/src/c2se/core/network.rs b/src/c2se/core/network.rs new file mode 100644 index 0000000..0069248 --- /dev/null +++ b/src/c2se/core/network.rs @@ -0,0 +1,3 @@ +const HEADER: &str = "bet.beteran.c2se.core.network"; + +pub const HEADER_CLIENT: &str = const_format::concatcp!(HEADER, ".Client"); diff --git a/src/c2se/frontend/identity.rs b/src/c2se/frontend/identity.rs index f14901e..b28902a 100644 --- a/src/c2se/frontend/identity.rs +++ b/src/c2se/frontend/identity.rs @@ -2,17 +2,27 @@ use crate::protobuf::rpc; const SUBJECT: &str = "bet.beteran.c2se.frontend.identity"; +pub const SUBJECT_CAPTCHA: &str = const_format::concatcp!(SUBJECT, ".Captcha"); +/// subject = bet.beteran.c2se.frontend.identity.Captcha +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub image: ::core::option::Option<::prost::alloc::string::String>, +} + pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); /// subject = bet.beteran.c2se.frontend.identity.Signin #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigninRequest { #[prost(string, tag = "1")] - pub site_url: ::prost::alloc::string::String, - #[prost(string, tag = "2")] pub username: ::prost::alloc::string::String, - #[prost(string, tag = "3")] + #[prost(string, tag = "2")] pub password: ::prost::alloc::string::String, - #[prost(string, tag = "4")] + #[prost(string, tag = "3")] pub security_code: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/c2se/mod.rs b/src/c2se/mod.rs index d5626ec..5290bd1 100644 --- a/src/c2se/mod.rs +++ b/src/c2se/mod.rs @@ -1,8 +1,10 @@ //! //! -/// /// pub mod backend; /// +/// +pub mod core; +/// pub mod frontend; diff --git a/src/models/core/mod.rs b/src/models/core/mod.rs new file mode 100644 index 0000000..a61610b --- /dev/null +++ b/src/models/core/mod.rs @@ -0,0 +1 @@ +pub mod network; diff --git a/src/models/core/network.rs b/src/models/core/network.rs new file mode 100644 index 0000000..96c9abd --- /dev/null +++ b/src/models/core/network.rs @@ -0,0 +1,9 @@ +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Client { + #[prost(string, optional, tag = "1")] + pub site_url: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, tag = "2")] + pub client_id: u64, + #[prost(string, tag = "3")] + pub client_ip: ::prost::alloc::string::String, +} diff --git a/src/models/mod.rs b/src/models/mod.rs index 0dd2a03..f9eb5a6 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -1 +1,2 @@ +pub mod core; pub mod member; diff --git a/src/ss/member/identity.rs b/src/ss/member/identity.rs index 61efa1b..ddc52e6 100644 --- a/src/ss/member/identity.rs +++ b/src/ss/member/identity.rs @@ -1,13 +1,28 @@ +use crate::models::core; use crate::protobuf::rpc; const SUBJECT: &str = "bet.beteran.ss.member.identity"; +/// subject = bet.beteran.ss.member.identity.Captcha +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaRequest { + #[prost(message, optional, tag = "1")] + pub client: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CaptchaResponse { + #[prost(message, optional, tag = "1")] + pub error: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub image: ::core::option::Option<::prost::alloc::string::String>, +} + pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); /// subject = bet.beteran.ss.member.identity.Signin #[derive(Clone, PartialEq, ::prost::Message)] pub struct SigninRequest { - #[prost(string, tag = "1")] - pub site_url: ::prost::alloc::string::String, + #[prost(message, optional, tag = "1")] + pub client: ::core::option::Option, #[prost(string, tag = "2")] pub username: ::prost::alloc::string::String, #[prost(string, tag = "3")]