Create encrypted JWT

def create_token(self, data, token_valid_for=180) -> str:
        """ Create encrypted JWT """
        jwt_token = jwt.encode({
            'data': data,
            'exp': datetime.utcnow() + timedelta(seconds=token_valid_for)},
            self.app_secret)
        return Security.encrypt(jwt_token)