Set token_data by Keystone

def _set_token_data(self):
        """ Set token_data by Keystone """

        if not self.token:
            return

        self._set_config_keystone(
            settings.KEYSTONE_USERNAME, settings.KEYSTONE_PASSWORD)

        token_data = self._keystone_auth.validate_token(self.token)

        if not token_data:
            self.logger.error('Invalid Token')
            raise InvalidToken('Invalid Token')

        self.token_data = token_data

        if self.cache.is_redis_ok():
            try:
                self.cache.set_cache_token(token_data)
            except CacheException:
                self.logger.error('Token not setted in cache.')