Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expressjs-simple-security edit readme #69

Open
wants to merge 1 commit into
base: expressjs-simple-security
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ExpressJS - simple security
# ExpressJS - simple security

##Summary
## Summary
Authentication in ExpressJS.

We've got simple app where user can do CRUD operations on a phone book. Please, secure it.

##Goal
## Goal
Your task is to secure the `phone` endpoint so that only authenticated users can interact with it.
There are already some routes and business objects configured.
All you need to do is to implement authentication.
Expand All @@ -18,9 +18,9 @@ Managers pass the context to `security` service that decides if user is authenti
If user is NOT authenticated an is attempts to get restricted resource, the they should get 401 http status code.
Password in database should be encoded with `sha1`.

##API
## API

###Authenticate user
### Authenticate user
```
POST /api/user/auth
{email:'', password:''}
Expand All @@ -39,7 +39,7 @@ Sample header for token 'abc'.
Authorization: Token YWJj
```

##Setup
## Setup
To install dependencies from package.json:

yarn install
Expand Down