Skip to content

Commit

Permalink
Require non-empty ID token audience
Browse files Browse the repository at this point in the history
  • Loading branch information
dinvlad committed Aug 22, 2020
1 parent ffe213d commit c4462ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions google_yubikey/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def get_id_token(yubikey: YubiKey, slot: int, prompt_management_key: bool,
service_account_email: str, audience: str,
token_lifetime: int, stream=sys.stderr):
""" Generates a Google ID token with a YubiKey """
if not audience:
raise ValueError('ID tokens must use a non-empty audience')
return _get_jwt(
yubikey, slot, prompt_management_key,
service_account_email, audience, [], token_lifetime, stream,
Expand Down

0 comments on commit c4462ab

Please sign in to comment.