original_docstring: 
      Validate the authorization token ('idToken') issued by Auth0.
  
      Returns the userID of the user.
      
docstring: Validate the authorization token ('idToken') issued by Auth0.
  Returns the userID of the user.
docstring_tokens: Validate the authorization token ( ' idToken ' ) issued by Auth0 . Returns the userID of the user .
code: def validate_token(token):
      """
      Validate the authorization token ('idToken') issued by Auth0.
  
      Returns the userID of the user.
      """
      if token is None:
          # NOTE: This check is important because we short-circuit below
          #       with _temp_auth_token
          raise ValueError("Expected non-null user id")
  
      if token == _temp_auth_token:
          return _temp_user_id
  
      try:
          payload = jwt.decode(token, secret, audience=client_id)
      except (jwt.ExpiredSignature, jwt.InvalidAudienceError, jwt.DecodeError):
          raise ValueError("Credentials invalid or expired, please try again")
  
      # Example response:
      #    { 'iat': 1474629433
      #    , 'azp': 'phA8QFWKknNtcDwVefccBf82sIp4bw6c'
      #    , 'exp': 1474665433
      #    , 'iss': 'https://tuppu.eu.auth0.com/'
      #    , 'sub': 'email|57c2d977469d42056d3f7376'
      #    , 'aud': 'phA8QFWKknNtcDwVefccBf82sIp4bw6c'
      #    }
  
      if time.time() > payload['exp']:
          raise ValueError("Credentials expired, please try again")
  
      return payload['sub']
code_tokens: def validate_token ( token ) : if token is None : raise ValueError ( "Expected non-null user id" ) if token == _temp_auth_token : return _temp_user_id try : payload = jwt . decode ( token , secret , audience = client_id ) except ( jwt . ExpiredSignature , jwt . InvalidAudienceError , jwt . DecodeError ) : raise ValueError ( "Credentials invalid or expired, please try again" ) if time . time ( ) > payload [ 'exp' ] : raise ValueError ( "Credentials expired, please try again" ) return payload [ 'sub' ]
short_docstring: Validate the authorization token ('idToken') issued by Auth0.
short_docstring_tokens: Validate the authorization token ( ' idToken ' ) issued by Auth0 .
comment: """
      Validate the authorization token ('idToken') issued by Auth0.
  
      Returns the userID of the user.
      """$SEP$# NOTE: This check is important because we short-circuit below$SEP$#       with _temp_auth_token$SEP$# Example response:$SEP$#    { 'iat': 1474629433$SEP$#    , 'azp': 'phA8QFWKknNtcDwVefccBf82sIp4bw6c'$SEP$#    , 'exp': 1474665433$SEP$#    , 'iss': 'https://tuppu.eu.auth0.com/'$SEP$#    , 'sub': 'email|57c2d977469d42056d3f7376'$SEP$#    , 'aud': 'phA8QFWKknNtcDwVefccBf82sIp4bw6c'$SEP$#    }