Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1016 Bytes

installation.md

File metadata and controls

33 lines (21 loc) · 1016 Bytes

Installation

To install Guardian, add an entry to your mix.exs:

def deps do
  [
    # ...
    {:guardian, "~> 1.0"}
  ]
end

Implementation Module

Guardian requires knowing some information for how you want your token to behave.

By default, Guardian uses JWT as the default token type but other token types can be used by implementing the Guardian.Token behaviour.

Configuration

Configuration for Guardian is determined by the Token module that is used and may be extended by other modules.

For default setup please see the default token docs

Plug, Phoenix, and Guardian

Most people use Guardian to support HTTP and Websockets with Phoenix.

Phoenix and Plug are not required but if they are present Most people use Absinthe to support an HTTP API.

You'll want to read the Plug and Phoenix for specific installation and configuration options.