Skip to main content

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

Asthowen

License

MojangAuth-Python | Mozilla Public License 2.0

Project details


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.4.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

MojangAuthPython-0.1.4-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page