()
| 1490 | |
| 1491 | def build_refresh_callback(self, bucket): |
| 1492 | def refresher(): |
| 1493 | response = self._client.create_session(Bucket=bucket) |
| 1494 | creds = response['Credentials'] |
| 1495 | expiration = self._serialize_if_needed( |
| 1496 | creds['Expiration'], iso=True |
| 1497 | ) |
| 1498 | return { |
| 1499 | "access_key": creds['AccessKeyId'], |
| 1500 | "secret_key": creds['SecretAccessKey'], |
| 1501 | "token": creds['SessionToken'], |
| 1502 | "expiry_time": expiration, |
| 1503 | } |
| 1504 | |
| 1505 | return refresher |
| 1506 |
nothing calls this directly
no test coverage detected