<commit_before><a href="https://codeclimate.com/github/TNOCS/node-auth"><img src="https://codeclimate.com/github/TNOCS/node-auth/badges/gpa.svg" /></a>
<a href="https://codeclimate.com/github/TNOCS/node-auth"><img src="https://codeclimate.com/github/TNOCS/node-auth/badges/issue_count.svg" /></a>

# node-auth
User management node-express-mongodb middleware

node-auth is an express middleware for authentication, which creates a REST API with multiple endpoints. The default routes are:
- /api/login: after successful login using email and password, the response contains a JSON web token for future authentication requests
- /api/profile: to manage the user's own profile
- /api/signup: so a user can signup themselves
- /api/users: for management of users by an administrator
- /api/activate: for activating accounts and resending activation emails


## USE CASE: Verifying emails
1. A user signs up with email
2. The system creates a user account: verified = false
3. The system creates a link to verify his email<commit_msg>Added Travis badge<commit_after>[![Build Status](https://travis-ci.org/TNOCS/node-auth.svg?branch=master)](https://travis-ci.org/TNOCS/node-auth)
<a href="https://codeclimate.com/github/TNOCS/node-auth"><img src="https://codeclimate.com/github/TNOCS/node-auth/badges/gpa.svg" /></a>
<a href="https://codeclimate.com/github/TNOCS/node-auth"><img src="https://codeclimate.com/github/TNOCS/node-auth/badges/issue_count.svg" /></a>

# node-auth
User management node-express-mongodb middleware

node-auth is an express middleware for authentication, which creates a REST API with multiple endpoints. The default routes are:
- /api/login: after successful login using email and password, the response contains a JSON web token for future authentication requests
- /api/profile: to manage the user's own profile
- /api/signup: so a user can signup themselves
- /api/users: for management of users by an administrator
- /api/activate: for activating accounts and resending activation emails


## USE CASE: Verifying emails
1. A user signs up with email
2. The system creates a user account: verified = false
3. The system creates a link to verify his email
{'fraction_non_alphanumeric': 0.11116214974735875, 'fraction_numerical': 0.002756086357372531, 'mean_word_length': 4.642487046632124, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7669172', 'n_tokens_mistral': 649, 'n_tokens_neox': 626, 'n_words': 225}