MCPcopy Create free account
hub / github.com/cloudflare/cloudflared / get_token

Method get_token

component-tests/config.py:81–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

79 return self.full_config["tunnel"]
80
81 def get_token(self):
82 creds = self.get_credentials_json()
83 token_dict = {"a": creds["AccountTag"], "t": creds["TunnelID"], "s": creds["TunnelSecret"]}
84 token_json_str = json.dumps(token_dict)
85 return base64.b64encode(token_json_str.encode('utf-8'))
86
87 def get_credentials_json(self):
88 with open(self.credentials_file) as json_file:

Callers 2

test_get_tokenMethod · 0.80
run_serviceMethod · 0.80

Calls 2

get_credentials_jsonMethod · 0.95
encodeMethod · 0.45

Tested by 2

test_get_tokenMethod · 0.64
run_serviceMethod · 0.64