def continuation(request, context, call_details): state.append(CapturedState( current_identity=api.get_current_identity().to_bytes(), is_superuser=api.is_superuser(), peer_identity=api.get_peer_identity().to_bytes(), peer_ip=api.get_peer_ip(), delegation_token=api.get_delegation_token(), )) return empty_pb2.Empty()
def call_with_tokens(self, delegation_tok=None, luci_project=None): headers = {} if delegation_tok: headers['X-Delegation-Token-V1'] = delegation_tok if luci_project: headers[check.X_LUCI_PROJECT] = luci_project self.call('127.0.0.1', '*****@*****.**', headers) return { 'cur_id': api.get_current_identity().to_bytes(), 'peer_id': api.get_peer_identity().to_bytes(), }
def get(self): self.response.write( json.dumps({ 'peer_id': api.get_peer_identity().to_bytes(), 'cur_id': api.get_current_identity().to_bytes(), }))
def get(self): self.response.write(json.dumps({ 'peer_id': api.get_peer_identity().to_bytes(), 'cur_id': api.get_current_identity().to_bytes(), }))