pub struct Shield<U: User> { /* private fields */ }Implementations§
Source§impl<U: User> Shield<U>
impl<U: User> Shield<U>
pub fn new<S>(storage: S, providers: Vec<Arc<dyn Provider>>) -> Selfwhere
S: Storage<U> + 'static,
pub fn storage(&self) -> &dyn Storage<U>
pub fn provider_by_id(&self, provider_id: &str) -> Option<&dyn Provider>
pub async fn subproviders( &self, ) -> Result<Vec<Box<dyn Subprovider>>, ShieldError>
pub async fn subprovider_visualisations( &self, ) -> Result<Vec<SubproviderVisualisation>, ShieldError>
pub async fn sign_in( &self, request: SignInRequest, session: Session, ) -> Result<Response, ShieldError>
pub async fn sign_in_callback( &self, request: SignInCallbackRequest, session: Session, ) -> Result<Response, ShieldError>
pub async fn sign_out(&self, session: Session) -> Result<Response, ShieldError>
Trait Implementations§
Source§impl<U: User> DynShield for Shield<U>
impl<U: User> DynShield for Shield<U>
fn subproviders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn Subprovider>>, ShieldError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subprovider_visualisations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SubproviderVisualisation>, ShieldError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_in<'life0, 'async_trait>(
&'life0 self,
request: SignInRequest,
session: Session,
) -> Pin<Box<dyn Future<Output = Result<Response, ShieldError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_in_callback<'life0, 'async_trait>(
&'life0 self,
request: SignInCallbackRequest,
session: Session,
) -> Pin<Box<dyn Future<Output = Result<Response, ShieldError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_out<'life0, 'async_trait>(
&'life0 self,
session: Session,
) -> Pin<Box<dyn Future<Output = Result<Response, ShieldError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<U> Freeze for Shield<U>
impl<U> !RefUnwindSafe for Shield<U>
impl<U> Send for Shield<U>
impl<U> Sync for Shield<U>
impl<U> Unpin for Shield<U>
impl<U> !UnwindSafe for Shield<U>
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