pub struct SSOCredentialProvider { /* private fields */ }Expand description
SSO Credentials Provider
This provider fetches credentials from AWS SSO (IAM Identity Center). It reads cached SSO tokens from ~/.aws/sso/cache/ and exchanges them for temporary credentials.
§Configuration
SSO configuration is typically stored in ~/.aws/config under a profile:
[profile my-sso-profile]
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_region = us-east-1
sso_account_id = 123456789012
sso_role_name = MyRoleImplementations§
Source§impl SSOCredentialProvider
impl SSOCredentialProvider
Sourcepub fn with_profile(self, profile: impl Into<String>) -> Self
pub fn with_profile(self, profile: impl Into<String>) -> Self
Set the profile name to use
Sourcepub fn with_account_id(self, account_id: impl Into<String>) -> Self
pub fn with_account_id(self, account_id: impl Into<String>) -> Self
Set SSO account ID
Sourcepub fn with_region(self, region: impl Into<String>) -> Self
pub fn with_region(self, region: impl Into<String>) -> Self
Set SSO region
Sourcepub fn with_role_name(self, role_name: impl Into<String>) -> Self
pub fn with_role_name(self, role_name: impl Into<String>) -> Self
Set SSO role name
Sourcepub fn with_start_url(self, start_url: impl Into<String>) -> Self
pub fn with_start_url(self, start_url: impl Into<String>) -> Self
Set SSO start URL
Sourcepub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
Set custom SSO endpoint (for testing)
Trait Implementations§
Source§impl Clone for SSOCredentialProvider
impl Clone for SSOCredentialProvider
Source§fn clone(&self) -> SSOCredentialProvider
fn clone(&self) -> SSOCredentialProvider
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 moreSource§impl Debug for SSOCredentialProvider
impl Debug for SSOCredentialProvider
Source§impl Default for SSOCredentialProvider
impl Default for SSOCredentialProvider
Source§impl ProvideCredential for SSOCredentialProvider
impl ProvideCredential for SSOCredentialProvider
Source§type Credential = Credential
type Credential = Credential
Credential returned by this loader. Read more
Source§async fn provide_credential(
&self,
ctx: &Context,
) -> Result<Option<Self::Credential>>
async fn provide_credential( &self, ctx: &Context, ) -> Result<Option<Self::Credential>>
Load signing credential from current env.
Auto Trait Implementations§
impl Freeze for SSOCredentialProvider
impl RefUnwindSafe for SSOCredentialProvider
impl Send for SSOCredentialProvider
impl Sync for SSOCredentialProvider
impl Unpin for SSOCredentialProvider
impl UnsafeUnpin for SSOCredentialProvider
impl UnwindSafe for SSOCredentialProvider
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> ProvideCredentialDyn for Twhere
T: ProvideCredential + ?Sized,
impl<T> ProvideCredentialDyn for Twhere
T: ProvideCredential + ?Sized,
Source§type Credential = <T as ProvideCredential>::Credential
type Credential = <T as ProvideCredential>::Credential
Credential returned by this loader.
Source§fn provide_credential_dyn<'a>(
&'a self,
ctx: &'a Context,
) -> Pin<Box<dyn Future<Output = Result<Option<<T as ProvideCredentialDyn>::Credential>, Error>> + Send + 'a>>
fn provide_credential_dyn<'a>( &'a self, ctx: &'a Context, ) -> Pin<Box<dyn Future<Output = Result<Option<<T as ProvideCredentialDyn>::Credential>, Error>> + Send + 'a>>
Dyn version of
ProvideCredential::provide_credential.