Skip to content

Commit

Permalink
Make compatible with .datasource-juggler 2.56.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-abramow committed Nov 22, 2018
1 parent b064b6d commit fe79966
Show file tree
Hide file tree
Showing 3 changed files with 11,700 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/models/access-token.js
Expand Up @@ -209,6 +209,11 @@ module.exports = function(AccessToken) {
if (typeof id === 'string') {
// Add support for oAuth 2.0 bearer token
// http://tools.ietf.org/html/rfc6750

// To prevent Error: Model::findById requires the id argument
// with loopback-datasource-juggler 2.56.0+
if (id === '') continue;

if (id.indexOf('Bearer ') === 0) {
id = id.substring(7);
// Decode from base64
Expand Down

0 comments on commit fe79966

Please sign in to comment.