MCPcopy Index your code
hub / github.com/aws/aws-cli / _build_headers

Method _build_headers

awscli/botocore/credentials.py:2102–2112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2100 )
2101
2102 def _build_headers(self):
2103 auth_token = None
2104 if self.ENV_VAR_AUTH_TOKEN_FILE in self._environ:
2105 auth_token_file_path = self._environ[self.ENV_VAR_AUTH_TOKEN_FILE]
2106 with open(auth_token_file_path) as token_file:
2107 auth_token = token_file.read()
2108 elif self.ENV_VAR_AUTH_TOKEN in self._environ:
2109 auth_token = self._environ[self.ENV_VAR_AUTH_TOKEN]
2110 if auth_token is not None:
2111 self._validate_auth_token(auth_token)
2112 return {'Authorization': auth_token}
2113
2114 def _validate_auth_token(self, auth_token):
2115 if "\r" in auth_token or "\n" in auth_token:

Callers 1

_retrieve_or_failMethod · 0.95

Calls 2

_validate_auth_tokenMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected