mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 11:22:42 -06:00
remove gsa from IDS code
This commit is contained in:
parent
322c7388c8
commit
d740f3bc6b
1 changed files with 0 additions and 15 deletions
|
@ -10,7 +10,6 @@ from cryptography.hazmat.primitives import hashes, serialization
|
||||||
from cryptography.hazmat.primitives.asymmetric import padding, rsa
|
from cryptography.hazmat.primitives.asymmetric import padding, rsa
|
||||||
from cryptography.x509.oid import NameOID
|
from cryptography.x509.oid import NameOID
|
||||||
|
|
||||||
import gsa
|
|
||||||
import bags
|
import bags
|
||||||
|
|
||||||
from . import signing
|
from . import signing
|
||||||
|
@ -51,20 +50,6 @@ def get_auth_token(
|
||||||
) -> tuple[str, str]:
|
) -> tuple[str, str]:
|
||||||
from sys import platform
|
from sys import platform
|
||||||
|
|
||||||
use_gsa = False
|
|
||||||
# Check if objc is importable
|
|
||||||
try:
|
|
||||||
if platform == "darwin":
|
|
||||||
import objc
|
|
||||||
use_gsa = True
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if use_gsa:
|
|
||||||
logger.debug("Using GrandSlam to authenticate (native Anisette)")
|
|
||||||
g = gsa.authenticate(username, password, gsa.Anisette())
|
|
||||||
password = g["t"]["com.apple.gs.idms.pet"]["token"]
|
|
||||||
|
|
||||||
result = _auth_token_request(username, password)
|
result = _auth_token_request(username, password)
|
||||||
if result["status"] != 0:
|
if result["status"] != 0:
|
||||||
if result["status"] == 5000:
|
if result["status"] == 5000:
|
||||||
|
|
Loading…
Reference in a new issue