MojangAuthPython is a lib for mojang authentification.
Project description
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
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MojangAuthPython-0.1.3.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for MojangAuthPython-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc1f1691adddc65d915d8a0d36e9c7154f2d2b005698ebb1cee0019b3f65d11a |
|
MD5 | 33e917f8d716256d473e7b0d19bae12c |
|
BLAKE2b-256 | e3edb3a12a83547250a02d41103e6235f58268db685e32599e1bd599ed0d6b90 |