User Account End Points - AtLAS-WVU/AtLAS-server Wiki

The user account end points handle the creation of user accounts and also handles logging the user in and out from the app.

CheckLoginInfo

This end point checks the username and password to the username and hash stored in the users table in the AtLAS mysql database.

This functions accepts the follow POST parameters:

username - the username of the user trying to login
password - the password of the user

Disclaimer: The password is sent to the server in plaintext and hashed in this php script. Thus it is important to setup a connection to this endpoint with an encryption scheme such as SSL (https).

The script returns the following parameters:

success: true/false - indicates whether the script ran successfully
debug: string - only returned when the script fails. Gives a debug reason for the failure.
key: string - length 60. Contains numbers and letters. This is the private key that is used to authenticate the user for later transactions with the server.

CreateAccount

This end point creates a AtLAS user account in the users table of the AtLAS mysql database.

This function accepts the following POST parameters:

username: string - the desired username of the user
password: string - the desired password for the user
email: string - email address of the user
first_name: string - first name of the user
last_name: string - last name of the user

Disclaimer: The password is sent to the server in plaintext and hashed in this php script. Thus it is important to setup a connection to this endpoint with an encryption scheme such as SSL (https).

The script returns the following parameters:

success: true/false - indicates whether the script ran successfully
debug: string - only returned when the script fails. Gives a debug reason for the failure.
uniqueUser: true/false - indicates whether the username is unique
uniqueEmail: true/false - indicates whether the email is unique