get_scitoken

igwn_auth_utils.get_scitoken(*args, outfile=None, minsecs=60, quiet=True, **kwargs)

Get a new SciToken using htgettoken and return its file location.

Parameters:
  • args – All positional arguments are passed as arguments to htgettoken.main.

  • outfile (str, optional) – The path in which to serialize the new SciToken. Default given by default_bearer_token_file().

  • minsecs (float, optional) – The minimum remaining lifetime to reuse an existing bearer token.

  • quiet (bool, optional) – If True, supress output from htgettoken.

  • kwargs – All key: value keyword arguments (including minsecs and quiet) are passed as --key=value options to htgettoken.main. Keywords with the value True are passed simply as --key, while those with the value False are omitted.

Returns:

tokenfile – The path to the bearer token file acquired by htgettoken.

Return type:

str

See also

igwn_auth_utils.scitokens.default_bearer_token_file

For information on the default bearer token path.