find_token#
- gwpy.io.scitokens.find_token(audience: str, scope: str, **kwargs) SciToken[source]#
Find and load a
Scitokenfor the givenaudienceandscope.- Parameters:
- audience
str The required value for the
audclaim.- scope
str The required value for the
scopeclaim. Can be a space-separated list of multiple scopes, _all_ of which must be matched by the token.- kwargs
All other keyword arguments are passed to
igwn_auth_utils.find_scitoken.
- audience
- Returns:
- token
scitokens.SciToken The token, if found, that matches the required claims.
- token
- Raises:
igwn_auth_utils.IgwnAuthErrorIf no valid token can be found.
See also
igwn_auth_utils.find_scitokenFor details on acceptable keyword arguments, and how tokens are discovered.
gwpy.io.scitoken.get_scitokenTo acquire a new token from the token issuer.