pub struct DefaultCredentialsProvider(/* private fields */);
Expand description
Wraps a ChainProvider
in an AutoRefreshingProvider
.
The underlying ChainProvider
checks multiple sources for credentials, and the AutoRefreshingProvider
refreshes the credentials automatically when they expire.
§Warning
This provider allows the credential_process
option in the AWS config
file (~/.aws/config
), a method of sourcing credentials from an external process. This can
potentially be dangerous, so proceed with caution. Other credential providers should be
preferred if at all possible. If using this option, you should make sure that the config file
is as locked down as possible using security best practices for your operating system.
Implementations§
Source§impl DefaultCredentialsProvider
impl DefaultCredentialsProvider
Sourcepub fn new() -> Result<DefaultCredentialsProvider, CredentialsError>
pub fn new() -> Result<DefaultCredentialsProvider, CredentialsError>
Creates a new thread-safe DefaultCredentialsProvider
.
Trait Implementations§
Source§impl Clone for DefaultCredentialsProvider
impl Clone for DefaultCredentialsProvider
Source§fn clone(&self) -> DefaultCredentialsProvider
fn clone(&self) -> DefaultCredentialsProvider
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ProvideAwsCredentials for DefaultCredentialsProvider
impl ProvideAwsCredentials for DefaultCredentialsProvider
Source§fn credentials<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AwsCredentials, CredentialsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn credentials<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AwsCredentials, CredentialsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Produce a new
AwsCredentials
future.Auto Trait Implementations§
impl Freeze for DefaultCredentialsProvider
impl !RefUnwindSafe for DefaultCredentialsProvider
impl Send for DefaultCredentialsProvider
impl Sync for DefaultCredentialsProvider
impl Unpin for DefaultCredentialsProvider
impl !UnwindSafe for DefaultCredentialsProvider
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