Пример #1
0
 def test_get_current_identity_host(self):
     """Validates caller host (from X-Host-Token) is stored in auth context."""
     tok = host_token.create_host_token('host-name.domain')
     self.call('127.0.0.1',
               '*****@*****.**',
               headers={'X-Host-Token-V1': tok})
     self.assertEqual('host-name.domain', api.get_current_identity_host())
Пример #2
0
 def test_get_current_identity_host(self):
   """Validates caller host (from X-Host-Token) is stored in auth context."""
   tok = host_token.create_host_token('host-name.domain')
   self.call('127.0.0.1', '*****@*****.**', headers={'X-Host-Token-V1': tok})
   self.assertEqual('host-name.domain', api.get_current_identity_host())
Пример #3
0
 def get(self):
   self.response.write(api.get_current_identity_host() or '<none>')