Lints.
This commit is contained in:
parent
1433f28846
commit
f37bad0e00
260 changed files with 6363 additions and 3766 deletions
|
|
@ -5,6 +5,7 @@ from moto.core.utils import iso_8601_datetime_with_milliseconds
|
|||
|
||||
|
||||
class Token(object):
|
||||
|
||||
def __init__(self, duration, name=None, policy=None):
|
||||
now = datetime.datetime.utcnow()
|
||||
self.expiration = now + datetime.timedelta(seconds=duration)
|
||||
|
|
@ -17,6 +18,7 @@ class Token(object):
|
|||
|
||||
|
||||
class AssumedRole(object):
|
||||
|
||||
def __init__(self, role_session_name, role_arn, policy, duration, external_id):
|
||||
self.session_name = role_session_name
|
||||
self.arn = role_arn
|
||||
|
|
@ -31,6 +33,7 @@ class AssumedRole(object):
|
|||
|
||||
|
||||
class STSBackend(BaseBackend):
|
||||
|
||||
def get_session_token(self, duration):
|
||||
token = Token(duration=duration)
|
||||
return token
|
||||
|
|
@ -43,4 +46,5 @@ class STSBackend(BaseBackend):
|
|||
role = AssumedRole(**kwargs)
|
||||
return role
|
||||
|
||||
|
||||
sts_backend = STSBackend()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue