Skip to content
This repository has been archived by the owner on Apr 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #14 from realchaseadams/patch-2
Browse files Browse the repository at this point in the history
Update README to match hapi 8
  • Loading branch information
dannycoates committed Dec 10, 2014
2 parents 218dff5 + 0d6884a commit 4fc37fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ authentication. The scheme requires the following options:
```javascript
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection();

var credentials = {
d74s3nz2873n: {
Expand All @@ -35,7 +36,7 @@ var getCredentials = function (id, callback) {
return callback(null, credentials[id]);
};

server.pack.require('hapi-auth-hawk', function (err) {
server.register('hapi-auth-hawk', function (err) {

server.auth.strategy('default', 'hawk', { getCredentialsFunc: getCredentials });
});
Expand All @@ -59,6 +60,7 @@ be used with 'GET' requests and requires the following options:
```javascript
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection();

var credentials = {
d74s3nz2873n: {
Expand All @@ -72,7 +74,7 @@ var getCredentials = function (id, callback) {
return callback(null, credentials[id]);
};

server.pack.require('hapi-auth-hawk', function (err) {
server.register('hapi-auth-hawk', function (err) {

server.auth.strategy('default', 'bewit', { getCredentialsFunc: getCredentials });
});
Expand Down

0 comments on commit 4fc37fa

Please sign in to comment.