This commit is contained in:
parent
ca8090d20d
commit
c4fe4f1bf1
1 changed files with 5 additions and 0 deletions
|
|
@ -1,9 +1,14 @@
|
|||
import requests
|
||||
from config import settings
|
||||
from argon2 import PasswordHasher
|
||||
|
||||
API_URL = "https://account.spfn.net/api/v2"
|
||||
CLIENT_ID = "splatnet"
|
||||
CLIENT_SECRET = settings.account_client_secret
|
||||
ph = PasswordHasher()
|
||||
|
||||
def hash_password(password: str):
|
||||
return ph.hash(password)
|
||||
|
||||
def get_token(username, password):
|
||||
url = f"{API_URL}/oauth2/generate_token"
|
||||
|
|
|
|||
Loading…
Reference in a new issue