pub struct RelintioAgent { /* private fields */ }Implementations§
Source§impl RelintioAgent
impl RelintioAgent
pub fn new(config: RelintioConfig) -> Self
Sourcepub fn verify_up_token(&self, token: &str) -> bool
pub fn verify_up_token(&self, token: &str) -> bool
Verifies the query string challenge token using HMAC-SHA256 signature checks.
Sourcepub fn passport_value(&self) -> String
pub fn passport_value(&self) -> String
Calculate the SHA256 hashed signature value for setting the passport cookie.
Sourcepub async fn refresh_rules(&self, domain: &str) -> Result<(), Box<dyn Error>>
pub async fn refresh_rules(&self, domain: &str) -> Result<(), Box<dyn Error>>
Triggers rules fetch from the API and saves it. Async-safe.
Sourcepub async fn send_heartbeat(&self, domain: &str)
pub async fn send_heartbeat(&self, domain: &str)
Heartbeat signal trigger.
Sourcepub fn score_request(
&self,
ip: &str,
user_agent: Option<&str>,
headers: &HashMap<String, String>,
method: &str,
path: &str,
) -> u32
pub fn score_request( &self, ip: &str, user_agent: Option<&str>, headers: &HashMap<String, String>, method: &str, path: &str, ) -> u32
Evaluates the request against protection rules.
Sourcepub async fn evaluate(
&self,
ip: &str,
user_agent: Option<&str>,
headers: &HashMap<String, String>,
method: &str,
path: &str,
domain: &str,
) -> Decision
pub async fn evaluate( &self, ip: &str, user_agent: Option<&str>, headers: &HashMap<String, String>, method: &str, path: &str, domain: &str, ) -> Decision
Evaluates the full decision path.
pub fn decoy_html() -> &'static str
pub fn block_html() -> &'static str
Auto Trait Implementations§
impl !Freeze for RelintioAgent
impl !RefUnwindSafe for RelintioAgent
impl !UnwindSafe for RelintioAgent
impl Send for RelintioAgent
impl Sync for RelintioAgent
impl Unpin for RelintioAgent
impl UnsafeUnpin for RelintioAgent
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