cf-auth-middleware
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -46,3 +46,3 @@ module.exports = createMiddleware | ||
res.header('www-authenticate', 'Catfish') | ||
return res.send(401) | ||
return res.sendStatus(401) | ||
}) | ||
@@ -49,0 +49,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Authentication middleware for APIs using cf-auth-provider", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"tags": [], | ||
@@ -20,11 +20,11 @@ "repository": { | ||
"devDependencies": { | ||
"supertest": "~0.8.2", | ||
"mocha": "1", | ||
"should": "2", | ||
"express": "^4.13.4", | ||
"hat": "0.0.3", | ||
"istanbul": "0", | ||
"jshint": "2", | ||
"jshint-full-path": "0", | ||
"express": "~3.4.4", | ||
"hat": "0.0.3" | ||
"mocha": "1", | ||
"should": "2", | ||
"supertest": "~0.8.2" | ||
} | ||
} |
@@ -41,2 +41,15 @@ # cf-auth-middleware | ||
You can also specifiy a custom TTL for the request. This can be sent in either the headers or the query string: | ||
``` | ||
Content-Type: 'application/json' | ||
x-cf-date: 'Tue, 05 Nov 2013 12:22:23 GMT' | ||
x-cf-ttl: '120000' | ||
authorization: 'Catfish {authorizing entity id}:{signed request}' | ||
``` | ||
``` | ||
?authorization={authorizing entity id}:{signed request}&x-cf-date=1423481045233&x-cf-ttl=120000 | ||
``` | ||
The client must sign requests with the [cf-signature](https://github.com/clocklimited/cf-signature) module. | ||
@@ -43,0 +56,0 @@ |
23690
76