Struct BrokerAuth
pub struct BrokerAuth {
pub broker_id: u32,
pub customer_id: u64,
pub broker_client_sig: Vec<u8>,
pub broker_client_key: Vec<u8>,
pub broker_web_sig: String,
pub server_time_secs: u32,
pub broker_client_sig_invalid_server_time_secs: u32,
pub broker_client_sig_invalid_local_time_secs: u64,
}Expand description
broker_auth HTTP 响应里提取出的 broker-specific 凭据。
这些字段是 broker TCP 通道 CMD 1001 登录的输入:
broker_id/customer_id决定 broker-side user identity;broker_client_sig作为 LoginReq client_sig;broker_client_key作为后续 broker TCP 加密 key。broker_web_sig由 broker CMD20203 主动刷新,并随 broker 账户持久化;- clientSig 的 server/local 失效时间按 C++ server-clock delta 投影。
对齐 C++:
FTLogin/Src/ftlogin/auth/impl/auth_impl.cpp:4214-4256(ParseBrokerAuthResponse)FTLogin/Src/ftlogin/channel/impl/proto/FTConnCmn.protobroker login identity fields
Fields§
§broker_id: u32§customer_id: u64§broker_client_sig: Vec<u8>§broker_client_key: Vec<u8>§broker_web_sig: String§server_time_secs: u32§broker_client_sig_invalid_server_time_secs: u32§broker_client_sig_invalid_local_time_secs: u64Trait Implementations§
§impl Clone for BrokerAuth
impl Clone for BrokerAuth
§fn clone(&self) -> BrokerAuth
fn clone(&self) -> BrokerAuth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BrokerAuth
impl RefUnwindSafe for BrokerAuth
impl Send for BrokerAuth
impl Sync for BrokerAuth
impl Unpin for BrokerAuth
impl UnsafeUnpin for BrokerAuth
impl UnwindSafe for BrokerAuth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more