pub struct OrgApi { /* private fields */ }Implementations§
Source§impl OrgApi
impl OrgApi
pub fn new(smartflow_url: impl Into<String>, vkey: impl Into<String>) -> Self
pub fn from_state(state: &OrgState) -> Self
Sourcepub async fn token_enroll(
smartflow_url: &str,
enrollment_token: &str,
device_fingerprint: &str,
device_name: &str,
platform: &str,
user_email: Option<&str>,
) -> Result<TokenEnrollResponse, OrgApiError>
pub async fn token_enroll( smartflow_url: &str, enrollment_token: &str, device_fingerprint: &str, device_name: &str, platform: &str, user_email: Option<&str>, ) -> Result<TokenEnrollResponse, OrgApiError>
Exchange a one-time enrollment token for a virtual key + device
id. Uses the existing enterprise_device_api::token_enroll
endpoint – no new server code required for enrollment itself.
pub async fn heartbeat(&self, device_id: &str) -> Result<(), OrgApiError>
Sourcepub async fn get_shieldset(
&self,
group: &str,
) -> Result<(String, u64), OrgApiError>
pub async fn get_shieldset( &self, group: &str, ) -> Result<(String, u64), OrgApiError>
Fetch the current shieldset YAML for a group, returning
(yaml, version). Version comes from the X-Shield-Policy-Version
header so the caller can decide whether to hot-reload.
Sourcepub async fn get_shieldset_version(
&self,
group: &str,
) -> Result<VersionInfo, OrgApiError>
pub async fn get_shieldset_version( &self, group: &str, ) -> Result<VersionInfo, OrgApiError>
Cheap version probe – no payload. Used by the policy pull loop to decide whether to fetch a full shieldset.
pub async fn post_events( &self, events: &[Value], ) -> Result<EventsAck, OrgApiError>
pub async fn identity_check( &self, req: &IdentityCheckRequest, ) -> Result<IdentityCheckResponse, OrgApiError>
pub async fn identity_begin( &self, req: &IdentityCheckRequest, ) -> Result<IdentityCheckResponse, OrgApiError>
pub async fn identity_result( &self, challenge_id: &str, ) -> Result<IdentityCheckResponse, OrgApiError>
pub async fn info(&self) -> Result<InfoResponse, OrgApiError>
Auto Trait Implementations§
impl !RefUnwindSafe for OrgApi
impl !UnwindSafe for OrgApi
impl Freeze for OrgApi
impl Send for OrgApi
impl Sync for OrgApi
impl Unpin for OrgApi
impl UnsafeUnpin for OrgApi
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