mirror of
https://github.com/JJTech0130/pypush.git
synced 2025-01-22 11:18:29 +00:00
don't hardcore username 🤣
This commit is contained in:
parent
50dd926559
commit
1fc7098d5a
10
ids.py
10
ids.py
@ -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")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user