def get_auth(self):
        """
        Gets an active token refreshing it if necessary.
        :return: str valid active authentication token.
        """
        if self.legacy_auth():
            return self._auth
        if not self.auth_expired():
            return self._auth
        self.claim_new_token()
        return self._auth
Gets an active token refreshing it if necessary.
        :return: str valid active authentication token.