Skip to content

UNDER CONSTRUCTION! - Application for authentication and authorization

License

Notifications You must be signed in to change notification settings

AlejoJamC/HappyAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HappyAuth

Application for authentication and authorization

Physical tiers and deployment

OAuth server Subdomain name: auth.example.com

REST server Subdomain name: api.example.com

Translations

Folder structure

  • assets | Here are stored the files relevant to API operation

    • docs | Documentation of every entity, router, imports, package or libraries that was created by us.
  • config | Configuration files

  • models | Data persistence layer (aka entities | databases documents )

  • routes | Business layer, Contains the logic, procedures and functions

//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

  • Every endpoint in lowercase and the noun in plural ( nouns )

  • prifix: /v0 (Last release version )

/v0/entity/nouns

Example:

  • [GET] /v1/users/1
  • [POST] /v1/users/1
  • [PUT] /v1/users/1
  • [DELETE] /v1/users/1

Documentation

Users

Allowed HTTP methods

Methods description
GET Get a resource
POST Create a resource
PUT Update a resource / Disable
DELETE Delete a resource

Status codes / Allowed HTTP response

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

About

UNDER CONSTRUCTION! - Application for authentication and authorization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published