def current_api_key():
    """Determines the API key for the current request.

    Returns:
        The ApiKey instance.
    """
    if app.config.get('IGNORE_AUTH'):
        return models.ApiKey(
            id='anonymous_superuser',
            secret='',
            superuser=True)

    ops = _get_api_key_ops()
    api_key = ops.get()
    logging.debug('Authenticated as API key=%r', api_key.id)

    return api_key
Determines the API key for the current request.

    Returns:
        The ApiKey instance.