Closed harmon25 closed 8 years ago
Great library! Really digging GraphQL in Elixir/Phoenix with Ecto, but seem to have a problem with the plug in front of Guardian.Plug.VerifyHeader
Guardian.Plug.VerifyHeader
Here is a snippet of the router that pipes graphql requests through an API endpoint which should include the guardian plugs...
pipeline :api do plug :accepts, ["json"] plug Guardian.Plug.VerifyHeader, realm: "Bearer" plug Guardian.Plug.LoadResource end scope "/api" do pipe_through :api forward "/", GraphQL.Plug.Endpoint, schema: {MyApp.GraphQL.Schema, :schema} end
The GraphQL endpoint seems to respond to the requests even if there is no Authorization header.
Authorization
Help is much appreciated, thanks!
OK was missing plug Guardian.Plug.EnsureAuthenticated, my bad! closing.
plug Guardian.Plug.EnsureAuthenticated
Great library! Really digging GraphQL in Elixir/Phoenix with Ecto, but seem to have a problem with the plug in front of
Guardian.Plug.VerifyHeader
Here is a snippet of the router that pipes graphql requests through an API endpoint which should include the guardian plugs...
The GraphQL endpoint seems to respond to the requests even if there is no
Authorization
header.Help is much appreciated, thanks!