Asthowen / MojangAuthPython

A Python lib for old Mojang authentification.

Home Page:https://pypi.org/project/MojangAuthPython/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MojangAuth-Python

A lib for mojang authentification.

Made with

Install prerequisites

  • Execute command: pip3 install MojangAuthPython

Examples

Simple Authentification

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)

Refresh Token

from MojangAuth import MojangAuth

mojang_auth = MojangAuth()

mojang_auth.refresh("accessToken", "clientToken")

Validate Token

from MojangAuth import MojangAuth

mojang_auth = MojangAuth()

mojang_auth.validate("accessToken", "clientToken") # return True if token is good and False if not

Invalidate Token

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

Sign-out

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

Author

Asthowen

License

MojangAuth-Python | Mozilla Public License 2.0

About

A Python lib for old Mojang authentification.

https://pypi.org/project/MojangAuthPython/

License:Mozilla Public License 2.0


Languages

Language:Python 100.0%