deserialize_token¶
- igwn_auth_utils.scitokens.deserialize_token(raw, **kwargs)¶
Deserialize a token.
- Parameters:
raw (
str) – the raw serialised token content to deserialisekwargs – all keyword arguments are passed on to
scitokens.SciToken.deserialize()
- Returns:
token – the deserialised token
- Return type:
scitokens.SciToken
See also
scitokens.SciToken.deserializeThe underlying deserialisation implementation.
load_token_fileA convenient wrapper for loading a
SciTokenfrom a file.
Examples
To load a token from a file:
>>> with open("scitoken.use") as file: ... token = deserialize_token(file)