def event_auth_to_requests(eventmatch, headers):
    """Convert the eventmatch authentication to requests arguments."""
    requests_kwargs = {}
    if eventmatch.get('auth').get('type', None) == 'basic':
        auth_obj = eventmatch.get('auth').get('basic', {})
        requests_kwargs['auth'] = auth_obj.get('username', ''), auth_obj.get(
            'password', '')
    elif eventmatch.get('auth').get('type', None) == 'header':
        auth_obj = eventmatch.get('auth').get('header', {})
        headers['Authorization'] = '{} {}'.format(auth_obj.get('type', ''),
            auth_obj.get('credentials', ''))
    return requests_kwargs
