pub struct StaticCredentialProvider {
pub credentials_by_auth: HashMap<Option<String>, Credentials>,
}Expand description
Use in case you already know your Auth provider Username and Password upfront.
Fields§
§credentials_by_auth: HashMap<Option<String>, Credentials>Trait Implementations§
Source§impl CredentialProvider for StaticCredentialProvider
impl CredentialProvider for StaticCredentialProvider
Source§fn auth_trusted(&self, auth_provider: &Option<String>) -> bool
fn auth_trusted(&self, auth_provider: &Option<String>) -> bool
provides a quick check to verify if a Auth Server is expected and
trusted This function is expected to return quickly.
Source§async fn get_credentials(
&self,
auth_provider: &Option<String>,
) -> Result<Credentials, ()>
async fn get_credentials( &self, auth_provider: &Option<String>, ) -> Result<Credentials, ()>
Called by the client once we are connected to the server and the server
is requiring us to provide Credentials.
This function is expected to trigger UI to wait for a result. So the
User might take a minute or so to log in.
Throw Error in case you want to abort login.
Source§impl Default for StaticCredentialProvider
impl Default for StaticCredentialProvider
Source§fn default() -> StaticCredentialProvider
fn default() -> StaticCredentialProvider
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StaticCredentialProvider
impl RefUnwindSafe for StaticCredentialProvider
impl Send for StaticCredentialProvider
impl Sync for StaticCredentialProvider
impl Unpin for StaticCredentialProvider
impl UnsafeUnpin for StaticCredentialProvider
impl UnwindSafe for StaticCredentialProvider
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
impl<T> Event for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Resource for T
impl<T> Storable for T
§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default and panics on an error case.