pub struct ApiKeyAuthFlow { /* private fields */ }Expand description
Generic API key authentication flow for providers that support API keys
Implementations§
Source§impl ApiKeyAuthFlow
impl ApiKeyAuthFlow
pub fn new( storage: Arc<dyn AuthStorage>, provider_id: ProviderId, provider_display_name: String, ) -> Self
Trait Implementations§
Source§impl AuthenticationFlow for ApiKeyAuthFlow
impl AuthenticationFlow for ApiKeyAuthFlow
Source§type State = ApiKeyAuthState
type State = ApiKeyAuthState
The state type for this authentication flow
Source§fn available_methods(&self) -> Vec<AuthMethod>
fn available_methods(&self) -> Vec<AuthMethod>
Get available authentication methods for this provider
Source§fn start_auth<'life0, 'async_trait>(
&'life0 self,
method: AuthMethod,
) -> Pin<Box<dyn Future<Output = Result<Self::State>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_auth<'life0, 'async_trait>(
&'life0 self,
method: AuthMethod,
) -> Pin<Box<dyn Future<Output = Result<Self::State>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start an authentication flow
Source§fn get_initial_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
_state: &'life1 Self::State,
method: AuthMethod,
) -> Pin<Box<dyn Future<Output = Result<AuthProgress>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_initial_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
_state: &'life1 Self::State,
method: AuthMethod,
) -> Pin<Box<dyn Future<Output = Result<AuthProgress>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get initial progress/instructions after starting auth
Source§fn handle_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut Self::State,
input: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AuthProgress>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut Self::State,
input: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<AuthProgress>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle user input during authentication
Source§fn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the provider is already authenticated
Source§fn provider_name(&self) -> String
fn provider_name(&self) -> String
Get a display name for the provider
Auto Trait Implementations§
impl Freeze for ApiKeyAuthFlow
impl !RefUnwindSafe for ApiKeyAuthFlow
impl Send for ApiKeyAuthFlow
impl Sync for ApiKeyAuthFlow
impl Unpin for ApiKeyAuthFlow
impl !UnwindSafe for ApiKeyAuthFlow
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
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request