1

I'm working on using Loopback to create a mock service. I need this mock service to authenticate using Bearer Tokens. Something like this:

curl -X GET --header 'Accept: application/json' --header 'Authorization: BEARER ABCDEFG' 'http://localhost:3000/api/Puppies'

At the moment, authentication is handled out of the box using a query string like this:

curl -X GET --header 'Accept: application/json' 'http://localhost:3000/api/Puppies?access_token=ABCDEFG'

Is there a way I can change the default authentication to the former?

Brendan
  • 11
  • 1
  • 1

1 Answers1

0

In order to authenticate using Bearer tokens, you can use Loopback @loopback/authentication package. If you want to use JWT, you need @loopback/authentication-jwt extension.