client info is added

This commit is contained in:
병준 박 2022-07-15 06:14:26 +00:00
parent d65e294c42
commit a572e8f45d
9 changed files with 63 additions and 11 deletions

View File

@ -2,17 +2,27 @@ use crate::protobuf::rpc;
const SUBJECT: &str = "bet.beteran.c2se.backend.identity"; 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<rpc::Error>,
#[prost(string, optional, tag = "2")]
pub image: ::core::option::Option<::prost::alloc::string::String>,
}
pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin");
/// subject = bet.beteran.c2se.backend.identity.Signin /// subject = bet.beteran.c2se.backend.identity.Signin
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SigninRequest { pub struct SigninRequest {
#[prost(string, tag = "1")] #[prost(string, tag = "1")]
pub site_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String, pub username: ::prost::alloc::string::String,
#[prost(string, tag = "3")] #[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String, pub password: ::prost::alloc::string::String,
#[prost(string, tag = "4")] #[prost(string, tag = "3")]
pub security_code: ::prost::alloc::string::String, pub security_code: ::prost::alloc::string::String,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]

1
src/c2se/core/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod network;

3
src/c2se/core/network.rs Normal file
View File

@ -0,0 +1,3 @@
const HEADER: &str = "bet.beteran.c2se.core.network";
pub const HEADER_CLIENT: &str = const_format::concatcp!(HEADER, ".Client");

View File

@ -2,17 +2,27 @@ use crate::protobuf::rpc;
const SUBJECT: &str = "bet.beteran.c2se.frontend.identity"; 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<rpc::Error>,
#[prost(string, optional, tag = "2")]
pub image: ::core::option::Option<::prost::alloc::string::String>,
}
pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin");
/// subject = bet.beteran.c2se.frontend.identity.Signin /// subject = bet.beteran.c2se.frontend.identity.Signin
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SigninRequest { pub struct SigninRequest {
#[prost(string, tag = "1")] #[prost(string, tag = "1")]
pub site_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String, pub username: ::prost::alloc::string::String,
#[prost(string, tag = "3")] #[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String, pub password: ::prost::alloc::string::String,
#[prost(string, tag = "4")] #[prost(string, tag = "3")]
pub security_code: ::prost::alloc::string::String, pub security_code: ::prost::alloc::string::String,
} }
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]

View File

@ -1,8 +1,10 @@
//! //!
//! //!
///
/// ///
pub mod backend; pub mod backend;
/// ///
///
pub mod core;
///
pub mod frontend; pub mod frontend;

1
src/models/core/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod network;

View File

@ -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,
}

View File

@ -1 +1,2 @@
pub mod core;
pub mod member; pub mod member;

View File

@ -1,13 +1,28 @@
use crate::models::core;
use crate::protobuf::rpc; use crate::protobuf::rpc;
const SUBJECT: &str = "bet.beteran.ss.member.identity"; 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<core::network::Client>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CaptchaResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<rpc::Error>,
#[prost(string, optional, tag = "2")]
pub image: ::core::option::Option<::prost::alloc::string::String>,
}
pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin"); pub const SUBJECT_SIGNIN: &str = const_format::concatcp!(SUBJECT, ".Signin");
/// subject = bet.beteran.ss.member.identity.Signin /// subject = bet.beteran.ss.member.identity.Signin
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct SigninRequest { pub struct SigninRequest {
#[prost(string, tag = "1")] #[prost(message, optional, tag = "1")]
pub site_url: ::prost::alloc::string::String, pub client: ::core::option::Option<core::network::Client>,
#[prost(string, tag = "2")] #[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String, pub username: ::prost::alloc::string::String,
#[prost(string, tag = "3")] #[prost(string, tag = "3")]