관리-도구
편집 파일: cmt_utils.cpython-311.pyc
� \�Dg� � �~ � d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZ dde fd�Z ddefd�Zd� Z dd�Zd � Zdefd �ZdS )� N)�DEFAULT_JWT_ES_TOKEN_PATH�PUSHGATEWAY_ADDRESS�DISABLE_CMT_FILEF�returnc � � t t dd�� � 5 }|� � � � � � }ddd� � n# 1 swxY w Y t j t � d�d|id�� � }|� � � |� � � }n=# t j t j j t t t f$ r | r� i cY S w xY w|S ) a3 Check that client is activated. Absence of JWT token means that client can have volume license like GoDaddy In this case we return False. Also we return False in case of some errors: - Errors during request of status from CM - Malformed JWT token - Incorrect answer from CM �r�utf-8��encodingNz/api/cm/get_backend_activationzX-Auth� )�headers�timeout)�openr �read�strip�requests�getr �raise_for_status�json�JSONDecodeError� exceptions�RequestException�OSError�KeyError�IOError)�raise_exception�f�token�req�activation_infos �v/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/lib/cmt_utils.py�client_activation_datar"