Home

Awesome

HappyAuth

Application for authentication and authorization

Folder structure

//Note: server.js Web service entry point ( executable )

General conventions

Coding

The names of the folders and files are going lowercase Variables: camelCase, varUser, CONSTANTAUTH Classes: Methods: Functions:

Database

URL endpoints

/v0/entity/nouns

Example:

Documentation

Users

Allowed HTTP methods

Methodsdescription
GETGet a resource
POSTCreate a resource
PUTUpdate a resource / Disable
DELETEDelete a resource

Status codes / Allowed HTTP response

Methodsdescription
200Success - OK
201Success - Created new resource
204Success - There is no content to answer
400Bad request - your request can not be assessed
401Unauthorized - user in this authenticated for this feature
404Not found - Resource doesn't exists
422unprocessable entity - validation errors
429Exceeded usage limits, try later
500Server error
503Service not available