This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Auth.Guardian.Pipeline do | |
@moduledoc """ | |
Configures a set of plugs to be used with Guardian based authentication / authorisation | |
""" | |
use Guardian.Plug.Pipeline, | |
otp_app: :orders, | |
error_handler: Auth.Guardian.ErrorHandler, | |
module: Auth.Guardian | |
# Verify authorisation header and make sure order management is allowed for Identity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pipeline for private apis, requires Authorisation header with Bearer token | |
pipeline :private do | |
plug :accepts, ["json"] | |
plug Auth.Guardian.Pipeline | |
end |
OlderNewer