2017-12-09 14:58:37 +01:00
|
|
|
defmodule EventosWeb.AuthPipeline do
|
2018-01-14 17:56:50 +01:00
|
|
|
@moduledoc """
|
|
|
|
Handles the app sessions
|
|
|
|
"""
|
2017-12-09 14:58:37 +01:00
|
|
|
|
|
|
|
use Guardian.Plug.Pipeline, otp_app: :eventos,
|
2018-01-13 23:33:03 +01:00
|
|
|
module: EventosWeb.Guardian,
|
2017-12-09 14:58:37 +01:00
|
|
|
error_handler: EventosWeb.AuthErrorHandler
|
|
|
|
|
2018-01-13 23:33:03 +01:00
|
|
|
plug Guardian.Plug.VerifyHeader, claims: %{"typ" => "access"}
|
2017-12-09 14:58:37 +01:00
|
|
|
plug Guardian.Plug.EnsureAuthenticated
|
|
|
|
plug Guardian.Plug.LoadResource, ensure: true
|
|
|
|
|
2018-01-14 17:56:50 +01:00
|
|
|
end
|