14 lines
426 B
Python
14 lines
426 B
Python
|
import urllib.request
|
||
|
import json
|
||
|
user = "test"
|
||
|
password = "test2"
|
||
|
auth_server = "http://localhost:3500/login"
|
||
|
auth_client_id = "213"
|
||
|
auth_secret = "888"
|
||
|
main_uri = "{}?username={}&password={}&client_id={}&client_secret={}".format(
|
||
|
auth_server, user, password, auth_client_id, auth_secret)
|
||
|
req = urllib.request.urlopen(main_uri, data=None)
|
||
|
jsons = req.read()
|
||
|
data = json.loads(jsons)
|
||
|
print(data["username"], data["uuid"])
|