Returns which directory contains the login_session token files
()
| 4159 | |
| 4160 | |
| 4161 | def get_login_token_cache_directory(): |
| 4162 | """Returns which directory contains the login_session token files""" |
| 4163 | if 'AWS_LOGIN_CACHE_DIRECTORY' in os.environ: |
| 4164 | path = os.path.expandvars(os.environ['AWS_LOGIN_CACHE_DIRECTORY']) |
| 4165 | path = os.path.expanduser(path) |
| 4166 | return path |
| 4167 | else: |
| 4168 | return os.path.expanduser(os.path.join('~', '.aws', 'login', 'cache')) |
| 4169 | |
| 4170 | |
| 4171 | class LoginCredentialsLoader: |