pub struct SsoProviderStore<'a> { /* private fields */ }Expand description
Adapter-backed store for SSO provider records.
Implementations§
Source§impl<'a> SsoProviderStore<'a>
impl<'a> SsoProviderStore<'a>
Sourcepub fn new(adapter: &'a dyn DbAdapter) -> Self
pub fn new(adapter: &'a dyn DbAdapter) -> Self
Create a provider store over an RustAuth adapter.
Sourcepub fn new_with_model(adapter: &'a dyn DbAdapter, model_name: &'a str) -> Self
pub fn new_with_model(adapter: &'a dyn DbAdapter, model_name: &'a str) -> Self
Create a provider store using a custom logical model name.
Sourcepub fn new_with_options(
adapter: &'a dyn DbAdapter,
options: &'a SsoOptions,
) -> Self
pub fn new_with_options( adapter: &'a dyn DbAdapter, options: &'a SsoOptions, ) -> Self
Create a provider store from plugin options.
Sourcepub fn new_with_model_and_domain_verification(
adapter: &'a dyn DbAdapter,
model_name: &'a str,
include_domain_verified: bool,
) -> Self
pub fn new_with_model_and_domain_verification( adapter: &'a dyn DbAdapter, model_name: &'a str, include_domain_verified: bool, ) -> Self
Create a provider store with explicit model and domain verification field support.
Sourcepub async fn list(&self) -> Result<Vec<SsoProviderRecord>, RustAuthError>
pub async fn list(&self) -> Result<Vec<SsoProviderRecord>, RustAuthError>
List all SSO providers.
Sourcepub async fn list_by_user(
&self,
user_id: &str,
) -> Result<Vec<SsoProviderRecord>, RustAuthError>
pub async fn list_by_user( &self, user_id: &str, ) -> Result<Vec<SsoProviderRecord>, RustAuthError>
List SSO providers owned by a user.
Sourcepub async fn find_by_provider_id(
&self,
provider_id: &str,
) -> Result<Option<SsoProviderRecord>, RustAuthError>
pub async fn find_by_provider_id( &self, provider_id: &str, ) -> Result<Option<SsoProviderRecord>, RustAuthError>
Find an SSO provider by stable provider id.
Sourcepub async fn find_by_organization_id(
&self,
organization_id: &str,
) -> Result<Option<SsoProviderRecord>, RustAuthError>
pub async fn find_by_organization_id( &self, organization_id: &str, ) -> Result<Option<SsoProviderRecord>, RustAuthError>
Find the first SSO provider assigned to an organization.
Sourcepub async fn create(
&self,
input: CreateSsoProviderInput,
) -> Result<SsoProviderRecord, RustAuthError>
pub async fn create( &self, input: CreateSsoProviderInput, ) -> Result<SsoProviderRecord, RustAuthError>
Create an SSO provider record.
Sourcepub async fn update_domain_verified(
&self,
provider_id: &str,
verified: bool,
) -> Result<Option<SsoProviderRecord>, RustAuthError>
pub async fn update_domain_verified( &self, provider_id: &str, verified: bool, ) -> Result<Option<SsoProviderRecord>, RustAuthError>
Update a provider domain verification flag.
Sourcepub async fn update(
&self,
provider_id: &str,
input: UpdateSsoProviderInput,
) -> Result<Option<SsoProviderRecord>, RustAuthError>
pub async fn update( &self, provider_id: &str, input: UpdateSsoProviderInput, ) -> Result<Option<SsoProviderRecord>, RustAuthError>
Partially update an SSO provider record.
Trait Implementations§
Source§impl<'a> Clone for SsoProviderStore<'a>
impl<'a> Clone for SsoProviderStore<'a>
Source§fn clone(&self) -> SsoProviderStore<'a>
fn clone(&self) -> SsoProviderStore<'a>
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 moreimpl<'a> Copy for SsoProviderStore<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SsoProviderStore<'a>
impl<'a> !UnwindSafe for SsoProviderStore<'a>
impl<'a> Freeze for SsoProviderStore<'a>
impl<'a> Send for SsoProviderStore<'a>
impl<'a> Sync for SsoProviderStore<'a>
impl<'a> Unpin for SsoProviderStore<'a>
impl<'a> UnsafeUnpin for SsoProviderStore<'a>
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> 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> 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