Skip to content

JeffLegendPower/TokenAuthenticationServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

TokenAuthenticationServer

Authenticate a client using http requests

Note: This is mostly a proof of concept project Uses express and bodyparser Node server

How to use: send a POST request with header application/json to the server the post request should be a json string looking something like this: {"gameToken":"ddb1c33c-ea19-42e6-ae99-c34ff4b0a8f8","computerToken":"4a8c44f9-4a59-4286-860a-b58e4005cb25"}

It will connect to an sql database and determine if the gameToken is valid, if its unclaimed then the computerToken will be set to the one requested. If it's already claimed then the computerToken has to match the one on the database (this will prevent multiple devices from using the same gameToken) The computerToken should be generated by the client and saved there. the response will either be 'APPROVED' (if it matches), 'DENIED' (if it doesn't match), or 'INVALID' (if the json string had unexpected keys)

About

Authenticate a client using http requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published