pub struct RiskSignal {
pub user_id: String,
pub ip: Option<String>,
pub device_id: Option<String>,
pub known_ip: bool,
pub known_device: bool,
pub country: Option<String>,
pub usual_country: Option<String>,
pub trace_id: Option<String>,
}Expand description
Signals available for a risk decision, gathered at the boundary. Extend by
reading RequestContext::client_ip() and headers in your controller.
Fields§
§user_id: String§ip: Option<String>§device_id: Option<String>A stable device/browser fingerprint, if the app computes one.
known_ip: boolWhether this IP has been seen for this user before.
known_device: boolWhether this device has been seen for this user before.
country: Option<String>Coarse geo (country code) if resolved from IP.
usual_country: Option<String>The user’s usual country, if known.
trace_id: Option<String>The originating request’s W3C trace id (ctx.trace_id_hex()), carried so
a federated-login audit record correlates to the request span.
Trait Implementations§
Source§impl Clone for RiskSignal
impl Clone for RiskSignal
Source§fn clone(&self) -> RiskSignal
fn clone(&self) -> RiskSignal
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 moreSource§impl Debug for RiskSignal
impl Debug for RiskSignal
Source§impl Default for RiskSignal
impl Default for RiskSignal
Source§fn default() -> RiskSignal
fn default() -> RiskSignal
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RiskSignal
impl RefUnwindSafe for RiskSignal
impl Send for RiskSignal
impl Sync for RiskSignal
impl Unpin for RiskSignal
impl UnsafeUnpin for RiskSignal
impl UnwindSafe for RiskSignal
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request