aws_credential_types

Type Alias Token

Source
pub type Token = Token;
Expand description

AWS Access Token

This access token type is used to authenticate to AWS services that use HTTP Bearer Auth with an AWS Builder ID such as CodeCatalyst.

For more details on tokens, see: https://oauth.net/2/access-tokens

Aliased Type§

struct Token(/* private fields */);

Implementations

Source§

impl Token

Source

pub fn new(token: impl Into<String>, expiration: Option<SystemTime>) -> Token

Constructs a new identity token for HTTP auth.

Source

pub fn token(&self) -> &str

Returns the underlying identity token.

Source

pub fn expiration(&self) -> Option<SystemTime>

Returns the expiration time (if any) for this token.

Source

pub fn for_tests() -> Token

Creates a Token for tests.

Trait Implementations§

Source§

impl ProvideToken for Token

Source§

fn provide_token<'a>(&'a self) -> ProvideToken<'a>
where Self: 'a,

Returns a future that provides an access token.
Source§

impl Clone for Token

Source§

fn clone(&self) -> Token

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Token

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<&str> for Token

Source§

fn from(token: &str) -> Token

Converts to this type from the input type.
Source§

impl From<String> for Token

Source§

fn from(api_key: String) -> Token

Converts to this type from the input type.
Source§

impl PartialEq for Token

Source§

fn eq(&self, other: &Token) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ResolveIdentity for Token

Source§

fn resolve_identity<'a>( &'a self, _runtime_components: &'a RuntimeComponents, _config_bag: &'a ConfigBag, ) -> IdentityFuture<'a>

Asynchronously resolves an identity for a request using the given config.
Source§

fn fallback_on_interrupt(&self) -> Option<Identity>

Returns a fallback identity. Read more
Source§

fn cache_location(&self) -> IdentityCacheLocation

Returns the location of an identity cache associated with this identity resolver. Read more
Source§

fn cache_partition(&self) -> Option<IdentityCachePartition>

Returns the identity cache partition associated with this identity resolver. Read more
Source§

impl Eq for Token

Source§

impl StructuralPartialEq for Token