pub struct SettingsClient { /* private fields */ }Expand description
Access to the /v1/gate/settings endpoints.
Obtain via Gate::settings.
Implementations§
Source§impl SettingsClient
impl SettingsClient
Sourcepub async fn get_security(&self) -> Result<SecuritySettings, Error>
pub async fn get_security(&self) -> Result<SecuritySettings, Error>
Fetch the tenant’s security settings (passwordless / MFA).
Maps to GET /v1/gate/settings/security.
Sourcepub async fn update_security(
&self,
settings: SecuritySettings,
) -> Result<(), Error>
pub async fn update_security( &self, settings: SecuritySettings, ) -> Result<(), Error>
Replace the tenant’s security settings.
Both fields are always sent — the update is a full replacement, not a
merge. Maps to PUT /v1/gate/settings/security.
§Example
use nautilus_rs::{Gate, SecuritySettings};
let gate = Gate::new("vrn_gate_live_sk_…");
gate.settings().update_security(SecuritySettings {
passwordless_enabled: true,
mfa_enabled: false,
}).await?;Sourcepub async fn get_oidc_providers(&self) -> Result<Vec<OidcProvider>, Error>
pub async fn get_oidc_providers(&self) -> Result<Vec<OidcProvider>, Error>
List the tenant’s social login (OIDC) providers and whether each is enabled — covering every provider Gate supports, regardless of state.
Maps to GET /v1/gate/settings/oidc-providers.
Sourcepub async fn update_oidc_providers(
&self,
providers: Vec<OidcProvider>,
) -> Result<Vec<OidcProvider>, Error>
pub async fn update_oidc_providers( &self, providers: Vec<OidcProvider>, ) -> Result<Vec<OidcProvider>, Error>
Set the enabled flag for one or more social login providers.
Any provider omitted from providers is left unchanged. Returns the
full, updated provider list. Maps to
PUT /v1/gate/settings/oidc-providers.
§Example
use nautilus_rs::{Gate, OidcProvider};
let gate = Gate::new("vrn_gate_live_sk_…");
let providers = gate.settings().update_oidc_providers(vec![
OidcProvider { provider: "github".into(), enabled: true },
OidcProvider { provider: "google".into(), enabled: true },
]).await?;Auto Trait Implementations§
impl !RefUnwindSafe for SettingsClient
impl !UnwindSafe for SettingsClient
impl Freeze for SettingsClient
impl Send for SettingsClient
impl Sync for SettingsClient
impl Unpin for SettingsClient
impl UnsafeUnpin for SettingsClient
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