'Try to authenticate an external user via REMOTE_USER variable.
:param request: A request object.
:param auth: Dictionary representing the authentication request.
:returns: A tuple containing the user reference, project identifier,
token expiration, bind information, and original audit
information.'

def authenticate(self, request, auth):

    username = request.environ.get('REMOTE_USER')
    if (not username):
        raise ExternalAuthNotApplicable()
    try:
        user_ref = self.identity_api.get_user_by_name(username, CONF.identity.default_domain_id)
    except exception.UserNotFound as e:
        raise exception.Unauthorized(e)
    tenant_id = self._get_project_id_from_auth(auth)
    expiry = common.default_expire_time()
    bind = None
    if (('kerberos' in CONF.token.bind) and (request.environ.get('AUTH_TYPE', '').lower() == 'negotiate')):
        bind = {'kerberos': username}
    audit_id = None
    return (user_ref, tenant_id, expiry, bind, audit_id)
