Throw an error if no authentication information is set and it is an external call (params.provider is set) or do nothing if it is an internal call (params.provider is undefined)
If successful, merge params with the return value of the authentication strategy
For example, a successful JWT strategy authentication will set:
jsparams.authentication.payload // The decoded payloadparams.authentication.strategy === 'jwt' // The strategy nameparams.user // or params[entity] if entity is not `null`
In the following hooks and for the service method call. It can be used as a before or around hook.
Check params.authentication against a list of authentication strategy names.
tsimport { authenticate } from '@feathersjs/authentication'// Authenticate with `jwt` and `api-key` strategy// using app.service('authentication') as the authentication serviceapp.service('messages').hooks({ around: { all: [authenticate('jwt', 'api-key')] }})