MCPcopy
hub / github.com/spaceandtimefdn/SxT-Python-SDK / get_access_token

Method get_access_token

src/spaceandtime/sxtbaseapi.py:439–448  ·  view source on GitHub ↗

-------------------- (alias) Calls and returns data from API: auth/token, which validates signed challenge token and provides new Access_Token and Refresh_Token. Can optionally supply a keymanager object, instead of the public_key and signed_challenge_token.

(self, user_id:str, challange_token:str, signed_challange_token:str='', public_key:str=None, keymanager:object=None, scheme:str = "ed25519")

Source from the content-addressed store, hash-verified

437
438
439 def get_access_token(self, user_id:str, challange_token:str, signed_challange_token:str='', public_key:str=None, keymanager:object=None, scheme:str = "ed25519"):
440 """--------------------
441 (alias) Calls and returns data from API: auth/token, which validates signed challenge token and provides new Access_Token and Refresh_Token.
442 Can optionally supply a keymanager object, instead of the public_key and signed_challenge_token.
443
444 Returns:
445 bool: Success flag (True/False) indicating the api call worked as expected.
446 object: Response information from the Space and Time network, as list or dict(json).
447 """
448 return self.auth_token(user_id, challange_token, signed_challange_token, public_key, keymanager, scheme)
449
450
451 def auth_token(self, user_id:str, challange_token:str, signed_challange_token:str='', public_key:str=None, keymanager:object=None, scheme:str = "ed25519"):

Callers 3

test_authenticateFunction · 0.95
register_new_userMethod · 0.80
authenticateMethod · 0.80

Calls 1

auth_tokenMethod · 0.95

Tested by 1

test_authenticateFunction · 0.76