Created
November 7, 2017 09:41
-
-
Save motephyr/3e32513549f586042ec9ae2cb75e2c98 to your computer and use it in GitHub Desktop.
Guardian router pipline
This file contains hidden or 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 :api do | |
plug :accepts, ["json"] | |
plug Guardian.Plug.Pipeline, module: GuardianSimpleAuth.Guardian, error_handler: GuardianSimpleAuth.ErrorHandler | |
plug Guardian.Plug.VerifySession, claims: %{"typ" => "access"} | |
plug Guardian.Plug.VerifyHeader, claims: %{"typ" => "access"} | |
plug Guardian.Plug.LoadResource, allow_blank: true | |
end | |
pipeline :auth do | |
plug Guardian.Plug.EnsureAuthenticated | |
end | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment