When an auth plugin exposes authentication artifacts (such as the User object from a database lookup), to be accessed in all route handlers via the request.auth.artifacts object, then this cannot be tested anymore using the server.inject method.
That code only allows to set a credentials object in the options, but not the artifacts (too).
(working on a pull request to fix this too)
When an auth plugin exposes authentication artifacts (such as the User object from a database lookup), to be accessed in all route handlers via the request.auth.artifacts object, then this cannot be tested anymore using the server.inject method.
That code only allows to set a credentials object in the options, but not the artifacts (too).
(working on a pull request to fix this too)