Authentication Documentation

This focuses on anything that requires a access token.

Authorization

This focuses on getting the access token.

class aiomojang.auth.Authorization(username: str, password: str, game: Optional[str] = 'Minecraft', ctoken: Optional[str] = None, request_user: Optional[str] = True)

Gets information on things that requires login.

username

The user’s username.

Type

str

password

The user’s password.

Type

str

game

The game in which to get.

Type

str

ctoken

The client token.

Type

bool

request_user

If you want additional infromation.

Type

bool

property access_token

Get’s the access token from the login infromation. :returns: The access token. :rtype: str

property client_token

Get’s the client token from the login infromation. :returns: The client token. :rtype: str

property created_at

Gets the account created at date. :returns: The created at date. :rtype: str

property dob

Get’s the date of birth :returns: The dob. :rtype: str

property email

Gets the email registered with the account. :returns: The email. :rtype: str

property id

Get’s the id of the profile. :returns: The id. :rtype: str

async invalidate(access_token, client_id: Optional[str] = None)

Invalidate the provided access token. :returns: The invalidation status. :rtype: dict

property ip

Get’s the ip. :returns: The ip. :rtype: str

property is_blocked

Checks to see if the thing is blocked. :returns: The blocked status. :rtype: str

property is_email_verified

Checks if the email is verified. :returns: The status. :rtype: str

property is_legacy

Checks to see if the account is legacy. :returns: The status. :rtype: str

property is_migrated

Checks the migration status. :returns: The access token. :rtype: str

property is_paid

Checks to see if the account is paid. :returns: The status. :rtype: str

property is_secured

Checks to see if the thing is secured. :returns: The security status. :rtype: str

property is_suspended

Checks to see if the account is suspended. :returns: The status. :rtype: str

property is_verified_by_parent

Checks to see if the account is verified by a parent. :returns: The status. :rtype: str

async login()

Logs in the user. :returns: The login status. :rtype: dict

property migrated_at

Get’s time time when the account was migrated. :returns: The time. :rtype: str

property migrated_from

Get’s where the account was migrated from. :returns: The migration location. :rtype: str

property name

Get’s the name of the account. :returns: The name of the account. :rtype: str

property password_changed_at

Gets the time the password was changed at. :returns: The changed at time. :rtype: str

property preferred_language

Get’s the preferred language from the login infromation. :returns: The preferred language token. :rtype: str

async refresh(access_token, get_id, client_id: Optional[str] = None)

Refreshes the given access token. :returns: The refresh status. :rtype: dict

property registered_at

Get’s the time when the account was registered. :returns: The time of registration. :rtype: str

async signout(username, password)

Signs out the user. :returns: The signout status. :rtype: dict

property twitch_access_token

Get’s the twitch token from the login infromation. :returns: The twitch access token. :rtype: str

property twitch_oauth_token

Get’s the access token from the login infromation. :returns: The twitch oauth token. :rtype: str

property uname

Get’s the username. :returns: The username. :rtype: str

property user_id

Get’s the user id. :returns: The user id. :rtype: str

property user_identifier

Get’s the user identifier.. :returns: The user identifier. :rtype: str

async validate(access_token, client_id: Optional[str] = None)

Validate a token. :returns: The validation status. :rtype: dict

User

This focuses on doing things with your access token.

class aiomojang.auth.User(username: str, password: str, game: Optional[str] = 'Minecraft', ctoken: Optional[str] = None, request_user: Optional[str] = True)
async change_name(auth_token, new_name: str)

See the respective protected classes.

async change_skin(auth_token, uuid: str)

See the respective protected classes.

async reset_skin(auth_token, uuid: str)

See the respective protected classes.

async static security_questions(auth_token)

Get’s a list fo security questions. :param auth_token: The access token.

async upload_skin(auth, file, var: str)

See the respective protected classes.