2020-01-23 21:59:50 +01:00
|
|
|
defmodule MobilizonWeb.Auth.Pipeline do
|
2018-01-14 17:56:50 +01:00
|
|
|
@moduledoc """
|
|
|
|
Handles the app sessions
|
|
|
|
"""
|
2017-12-09 14:58:37 +01:00
|
|
|
|
2018-07-27 10:45:35 +02:00
|
|
|
use Guardian.Plug.Pipeline,
|
2018-10-11 17:37:39 +02:00
|
|
|
otp_app: :mobilizon,
|
2020-01-23 21:59:50 +01:00
|
|
|
module: MobilizonWeb.Auth.Guardian,
|
|
|
|
error_handler: MobilizonWeb.Auth.ErrorHandler
|
2017-12-09 14:58:37 +01:00
|
|
|
|
2018-11-06 10:30:27 +01:00
|
|
|
plug(Guardian.Plug.VerifyHeader, realm: "Bearer")
|
|
|
|
plug(Guardian.Plug.LoadResource, allow_blank: true)
|
2020-01-23 21:59:50 +01:00
|
|
|
plug(MobilizonWeb.Auth.Context)
|
2018-01-14 17:56:50 +01:00
|
|
|
end
|