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

Add Request Header Authorization #73

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Add header authorization notes to README
  • Loading branch information
tcjennings committed Oct 5, 2017
commit c30c37a176fb70bcb7bcdd94ccbd101ffebd9511
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ broker's host to connect to it.
`mqtt_options` is optional, see the [mqtt](https://github.com/mqttjs/MQTT.js#connect) project for
allowed host and options values.

### Authorization

The optional `authentication_code` configuration element can be used to require the presence of a HTTP header named "auth_code" with a matching value.

```json
{
"authentication_code": "asdf1234"
}
```

The header could be added via `curl`: `curl -H "auth_code:asdf1234" localhost:8282:/hubs`, for example.

## Running It
Get up and running immediately with `script/server`.

Expand Down