Open charliewilco opened 5 years ago
working writing some unit tests.
the token is a valid token.
trying to authenticate my request like this:
const response = await server.inject({ method: "GET", url: "/api/posts", headers: { Authorization: token } });
and this:
const response = await server.inject({ method: "GET", url: "/api/posts", credentials: token });
both are giving me false positives.
i setup my auth strategy like this
await server.register(require("hapi-auth-jwt2")); server.auth.strategy("jwt", "jwt", { key: Config.key, validate: validate, verifyOptions: { algorithms: ["HS256"] } });
does anyone have any clarity on how i should be using server.inject() with this plugin?
server.inject()
how did you solve this ?
working writing some unit tests.
the token is a valid token.
trying to authenticate my request like this:
and this:
both are giving me false positives.
i setup my auth strategy like this
does anyone have any clarity on how i should be using
server.inject()
with this plugin?