<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def http_auth(self):
 """ Returns ``True`` if valid http auth credentials are found in the request header. """

        if 'HTTP_AUTHORIZATION' in self.request.META.keys():
            authmeth, auth = self.request.META['HTTP_AUTHORIZATION'].split(
                ' ', 1)
            if authmeth.lower() == 'basic':
                auth = auth.strip().decode('base64')
                identifier, password = auth.split(':', 1)
                username = get_username(identifier)
                user = authenticate(username=username, password=password)
                if user:
                    login(self.request, user)
                    return True