You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Don't overwrite Error object in tests
Instead of overwriting the default Error object with Foundation's
custom error object, name that one FoundationError.
* Fix assertion of Error equality
Two errors with different messages and/or names will no longer be
asserted as equal.
* Add test for error assertion
* Enforce bearer auth scheme (#32)
* Require Bearer prefix for auth token
* Make Bearer check case insensitive
* Fix tests
* Add test for missing Bearer prefix error
* Update docs with information about Bearer requirement
* Fix style error
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ var Auth = require('lambda-foundation').authentication;
27
27
28
28
### Authentication
29
29
30
-
Authentication is an asynchronous process, that assumes the event contains a value under the `authorization` key. This value could be a pure OAuth token or it could be a full header (with type prefix). The API returns a promise that fails if the context is not properly authenticated. Upon success, the promise resolves the token into its claims, which in general contain a `sub`, `exp` and `iat` keys as per the [JWT spec](http://jwt.io/introduction/).
30
+
Authentication is an asynchronous process, that assumes the event contains a value under the `authorization` key. This value must be an OAuth Bearer token, as defined in [RFC 6750](https://tools.ietf.org/html/rfc6750). The API returns a promise that fails if the context is not properly authenticated. Upon success, the promise resolves the token into its claims, which in general contain a `sub`, `exp` and `iat` keys as per the [JWT spec](http://jwt.io/introduction/).
31
31
32
32
```js
33
33
var Auth =require('lambda-foundation').authentication;
0 commit comments