A lib for mojang authentification.
- Execute command:
pip3 install MojangAuthPython
from MojangAuth import MojangAuth
mojang_auth = MojangAuth()
mojang_auth.auth("email", "password")
access_token = mojang_auth.access_token # return access token (str)
client_token = mojang_auth.client_token # return client token (str)
profile = mojang_auth.profile # return selected profile (list)
username = mojang_auth.username # return username (str)
id = mojang_auth.id #str : return id (str)
from MojangAuth import MojangAuth
mojang_auth = MojangAuth()
mojang_auth.refresh("accessToken", "clientToken")
from MojangAuth import MojangAuth
mojang_auth = MojangAuth()
mojang_auth.validate("accessToken", "clientToken") # return True if token is good and False if not
from MojangAuth import MojangAuth
mojang_auth = MojangAuth()
mojang_auth.invalidate("accessToken", "clientToken") # invalidated token and return True if token is good and False if not
from MojangAuth import MojangAuth
mojang_auth = MojangAuth()
mojang_auth.sign_out("email", "password") # sign-out user and return True if user successfully sign-out and False if not