Commit Graph

17 Commits

Author SHA1 Message Date
Raymond Feng 217c9fa348 Fix the typo and add Bearer token support
See https://github.com/strongloop/loopback/issues/333
2014-07-02 09:02:13 -07:00
Miroslav Bajtoš 45d026e7de Merge pull request #335 from karlmikko/bug/invalid-token-unhandled
Ignore unhanded error - simulate token missing
2014-06-27 09:56:17 +02:00
Karl Mikkelsen 46af483bdd Invalid Access Token return 401
Clean up logic to be easier to read.
Signed-off-by: Karl Mikkelsen <karl@karlmikko.com>
2014-06-26 08:50:41 +10:00
Samuel Reed afd8de0c31 Fix a slowdown caused by mutation of an incoming accessToken option. 2014-06-20 16:39:28 -05:00
Raymond Feng 46b579dc4a Make sure User/AccessToken relations are set up by default
User.login assumes the relation User.accessTokens exists
2014-02-14 10:31:30 -08:00
Raymond Feng 57796a41cd Remove the generated flag for access token id
The generated flag is used to indicate if the id is automatically generated
by the backend store. If it's set, the data type will be updated when the
model is attached to a datasource.

The AccessToken model defines a string id, which is set in the beforeCreate
hook. So it's client provided id.
2014-01-30 09:02:12 -08:00
Ritchie Martori 9fc8e197ee Start to move md to jsdoc 2014-01-14 10:03:47 -08:00
Ritchie fcc4bba82d Add reference documentation using sdocs 2013-12-19 17:49:47 -08:00
Ritchie Martori ad58a8ec13 Only look at cookies if they are available 2013-12-11 16:43:23 -08:00
Ritchie Martori 4560ec0964 Various ACL fixes 2013-12-10 21:49:18 -08:00
Ritchie Martori dfcb43e613 Allow requests without auth tokens 2013-12-10 15:57:55 -08:00
Ritchie Martori 2f9403016c Initial auth implementation 2013-11-22 12:26:59 -08:00
Ritchie Martori 1de2a40e88 Update AccessToken and User relationship
- Add created default
 - Default TTLs for user login access tokens
 - Break out User / AccessToken relationship
2013-11-14 19:41:29 -08:00
Ritchie Martori efce5039f6 Added AccessToken created property 2013-11-14 16:47:24 -08:00
Ritchie Martori 1bb95607b9 Update session / token documentation 2013-11-14 15:42:37 -08:00
Ritchie Martori 64d8ff986b Add loopback.token() middleware 2013-11-14 13:01:47 -08:00
Ritchie 77a137eca6 Rename Session => AccessToken 2013-11-14 10:05:13 -08:00