MCPcopy Create free account
hub / github.com/aws/aws-cli / get_auth_token

Method get_auth_token

awscli/botocore/session.py:480–498  ·  view source on GitHub ↗

Return the :class:`botocore.tokens.AuthToken` object associated with this session. If the authorization token has not yet been loaded, this will attempt to load it. If it has already been loaded, this will return the cached authorization token.

(self, **kwargs)

Source from the content-addressed store, hash-verified

478 return self._credentials
479
480 def get_auth_token(self, **kwargs):
481 """
482 Return the :class:`botocore.tokens.AuthToken` object associated with
483 this session. If the authorization token has not yet been loaded, this
484 will attempt to load it. If it has already been loaded, this will
485 return the cached authorization token.
486
487 """
488 provider = self._components.get_component('token_provider')
489
490 signing_name = kwargs.get('signing_name')
491 if signing_name is not None:
492 auth_token = provider.load_token(signing_name=signing_name)
493 if auth_token is not None:
494 return auth_token
495
496 if self._auth_token is None:
497 self._auth_token = provider.load_token()
498 return self._auth_token
499
500 def user_agent(self, truncate=False):
501 """

Callers 1

create_clientMethod · 0.95

Calls 2

get_componentMethod · 0.45
load_tokenMethod · 0.45

Tested by

no test coverage detected