deserialize_token

igwn_auth_utils.scitokens.deserialize_token(raw, **kwargs)

Deserialize a token.

Parameters:
  • raw (str) – the raw serialised token content to deserialise

  • kwargs – all keyword arguments are passed on to scitokens.SciToken.deserialize()

Returns:

token – the deserialised token

Return type:

scitokens.SciToken

See also

scitokens.SciToken.deserialize

The underlying deserialisation implementation.

load_token_file

A convenient wrapper for loading a SciToken from a file.

Examples

To load a token from a file:

>>> with open("scitoken.use") as file:
...     token = deserialize_token(file)