don't hardcore username 🤣

This commit is contained in:
JJTech0130 2023-05-09 12:55:44 -04:00
parent 50dd926559
commit 1fc7098d5a
No known key found for this signature in database
GPG key ID: 23C92EBCCF8F93D6

10
ids.py
View file

@ -421,12 +421,18 @@ class IDSUser:
KeyPair(self.push_connection.private_key, self.push_connection.cert),
)
def __str__(self):
return f"IDSUser(user_id={self.user_id}, handles={self.handles}, push_token={b64encode(self.push_connection.token).decode()})"
def test():
import getpass
conn = apns.APNSConnection()
conn.connect()
user = IDSUser(conn, "jjtech@jjtech.dev", "whiteCart25")
print(user.handles)
username = input("Enter username: ")
password = getpass.getpass("Enter password: ")
user = IDSUser(conn, username, password)
print(user)
# user.authenticate("test", "test")