edelmaenner / edelgames

Edelgames. Das Minispiel Portal der Edelmänner
MIT License
0 stars 3 forks source link

Rebuild user login #10

Closed Brofian closed 1 year ago

Brofian commented 1 year ago

The current user login is make by accessing the default login form of the homepage and parsing the html response. This should be rebuild to use the now available login API from @Zweistein2

API URL: https://edelmaenner.net/edelgames/authenticate -> 5 min timeout after failing authentication 5 times

Send POST Request to the API with the following content:

{
  "login": "benutzername",
  "password": "supergeheimespasswort",
  "xenforo_token": "secretTokenXF123456"
}

(Either password or xenforo_token has to be transmitted)

Response on failure:

{
    "login_sucessful": "false"
}

(or html, which should be catched while parsing the JSON)

Response on success:

{
    "login_sucessful": "true",
    "xenforo_token": "secretTokenXF123456",
    "minecraft_name": "benutzername",
    "user_id": 123456,
    "group_id": 123,
    "custom_title": "Mein toller Benutzer-Titel"
}
kid2407 commented 1 year ago

Current state can be found in kid2407/edelgames:feature/rebuild-user-login