Authentication - HerobrinesArmy/ChatInterfaces GitHub Wiki

The server uses cookies for authentication, and these cookies should be sent with every request to the server.

Authenticating with the server

Authenticating with the server is done through an HTTP GET request to http://herobrinesarmy.com/auth.php?user=${USER}&pass=${PASS} where ${USER} is your username and ${PASS} is your password. Please note that the server does not support https, so be careful where you auth with the server.

An example request using curl:

curl $PROXY -b cookie -c cookie -d "user=${USER}&pass=${PASS}" http://herobrinesarmy.com/auth.php

"-m 60" sets a 60 second timeout on the request (timeouts are generally a good idea)

"-s" makes curl shut up about download progress

"-b cookie -c cookie" means that it should both read and write cookies from the cookie file named "cookie"

"-d" Sends the data in a POST request to the server. Basically like if you were using a form submission on a website.

"http://herobrinesarmy.com/auth.php" is the request url

${USER} and ${PASS} are your username and password.

Checking Auth Status

Checking your current auth status can be done by sending an HTTP GET request to http://herobrinesarmy.com/amiauth along with the session cookie you will get after authenticating with the server. The server will return as plain text either "Yeah." or "Nope.".

An example request using curl:

curl -m 60 -s -b cookie -c cookie http://herobrinesarmy.com/amiauth

"-m 60" sets a 60 second timeout on the request (timeouts are generally a good idea)

"-s" makes curl shut up about download progress

"-b cookie -c cookie" means that it should both read and write cookies from the cookie file named "cookie"

"http://herobrinesarmy.com/amiauth" is simply the request URL