<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_authorized(self, request):
 """Check if the user is authenticated for the given request. The include_paths and exclude_paths are first checked. If authentication is required then the Authorization HTTP header is checked against the credentials. """

        if self._is_request_in_include_path(request):
            if self._is_request_in_exclude_path(request):
                return True
            else:
                auth = request.authorization
                if auth and auth[0] == 'Basic':
                    credentials = b64decode(auth[1]).decode('UTF-8')
                    username, password = credentials.split(':', 1)
                    return self._users.get(username) == password
                else:
                    return False
        else:
            return True