Packages

Easy to install Auth system with social integration just in 6 steps on Elixir Phoenix

Current section

Files

Jump to
plug_mishka_auth lib system guardian auth_pipeline.ex
Raw

lib/system/guardian/auth_pipeline.ex

defmodule MishkaAuth.AuthPipeline do
@claims %{typ: "access"}
use Guardian.Plug.Pipeline, otp_app: :mishka_auth, module: MishkaAuth.Guardian, error_handler: MishkaAuth.AuthErrorHandler
# plug Guardian.Plug.VerifySession, claims: @claims
plug Guardian.Plug.VerifyHeader, claims: @claims, realm: "Bearer"
plug Guardian.Plug.EnsureAuthenticated
plug Guardian.Plug.LoadResource, ensure: true
# json VerifyHeader
# plug Guardian.Plug.VerifyHeader, realm: "Bearer"
# plug Guardian.Plug.LoadResource, ensure: true, allow_blank: true
end