This python module stores the user credentials of riot users and also provides the riot auth api in one simple package so it can be used in multiple projects.
- Full auth flow
- Request helpers
- Basic endpoints for Valorant
- Captcha "bypass" without using external services
- Ability to use external Captcha solvers
The preferred method of installation is through pip but if you know better use the package manager that you want.
pip install ValVaultThe terminal module in ValVault is special for terminal applications since it has loose methods and it has a built-in password input.
from ValVault import terminal as Vault
Vault.init_auth()
Vault.new_user("Test", "Password")
username = Vault.get_users()[0]
user = User(username, Vault.get_pass(username))
auth = Vault.get_auth(user)If you want to implement your own password prompt or need to use a GUI you should use the class directly.
import ValVault
db_password = "MySecret"
db = ValVault.EncryptedDB(db_password)
entry = db.save_user("Test", "Password")
auth = db.get_auth(entry.username)ValVault is based off ValLib thus some DataClasses are shared like:
Usera dataclass containing username and passwordAutha dataclass containing ever auth param
If you want to read more about ValLib go here
ValVault contains:
Entrya custom DataClass to make database compatibility easier that contains all info about an userEncryptedDBa class to handle the database
ValVault.terminal contains the following methods:
init_vaultto setup the Vault and prompt the user for the passwordget_authprovided anUserget authenticatedget_usersget all usernamesget_aliasesget all aliasget_nameget the username of a given aliasset_aliasset the alias of a usernew_useradd an user to the Vault
The EncryptedDB contains the following methods:
save_userto add or modify an userfindto find several entriesfind_oneto find only one entryget_authto get the auth for a given usernamefix_databaseto fix broken entries in the database
And the following properties:
entriesa list of everyEntryusersa list of all usernamesaliasesa list of all aliases
- Async (?)
- More user properties
- Better documentation
- Better auth
Tests need to be run in a development environment with GUI, a navigator, pytest and filling this environment variables.
USERNAME="TestUser"
PASSWORD="TestPassword"And then running pytest.
- Thanks to Techdoodle for his API docs
- Thanks to the Valorant App Developers discord