Ejemplo n.º 1
0
 def validate(duser):
     signer = Signer(creds.secret)
     signature = signer.generate(credentials)
     if signature == credentials.signature:
         return True
     # NOTE(vish): Some libraries don't use the port when signing
     #             requests, so try again without port.
     if ':' in credentials.host:
         hostname, _port = credentials.host.split(":")
         credentials.host = hostname
         signature = signer.generate(credentials)
         return signature == credentials.signature
     return False
Ejemplo n.º 2
0
 def validate(duser):
     signer = Signer(creds.secret)
     signature = signer.generate(credentials)
     if signature == credentials.signature:
         return True
     # NOTE(vish): Some libraries don't use the port when signing
     #             requests, so try again without port.
     if ':' in credentials.host:
         hostname, _port = credentials.host.split(":")
         credentials.host = hostname
         signature = signer.generate(credentials)
         return signature == credentials.signature
     return False
Ejemplo n.º 3
0
 def validate(duser):
     signer = Signer(creds.secret)
     signature = signer.generate(credentials, s3=True)
     if signature == credentials.signature:
         return True
     return False
Ejemplo n.º 4
0
 def validate(duser):
     signer = Signer(creds.secret)
     signature = signer.generate(credentials, s3=True)
     if signature == credentials.signature:
         return True
     return False