import requests

BASE_URL = "https://saoauth.com/api/client/auth"
APP_NAME = "Kirigaya"
OWNER_ID = "706f2d48f9eb0762"
APP_SECRET = "27b79d48a7df496de8aff0c56f7624ddf29e9fff66fac08efb578e919a74e42f"
APP_VERSION = "1.0"


def check_session(session_id: str) -> bool:
    payload = {
        "type": "check",
        "sessionid": session_id,
        "name": APP_NAME,
        "ownerid": OWNER_ID,
    }
    response = requests.post(BASE_URL, data=payload, timeout=15)
    response.raise_for_status()
    return "success" in response.text.lower()


if __name__ == "__main__":
    print("SaoAuth Python example ready.")
    print(f"App: {APP_NAME} v{APP_VERSION}")
