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())
 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())
Beispiel #3
0
 def get(self):
   self.response.write(api.get_current_identity_host() or '<none>')