View Source KeenAuth (KeenAuth v0.2.2)

Configuration

config :keen_auth,
  auth_controller: MyAppWeb.AuthenticationController,
  strategies: [
    azure_ad: [
      token: MyAppWeb.AADToken,
      strategy: Assent.Strategy.Azure,
      config: [
        client_id: "REPLACE_WITH_CLIENT_ID",
        client_secret: "REPLACE_WITH_CLIENT_SECRET",
        redirect_uri: "http://localhost:4000/azure_ad/callback"
      ]
    ],
    github: [
      token: MyAppWeb.GithubToken,
      strategy: Assent.Strategy.Github,
      config: [
        client_id: "REPLACE_WITH_CLIENT_ID",
        client_secret: "REPLACE_WITH_CLIENT_SECRET",
        redirect_uri: "http://localhost:4000/github/callback"
      ]
    ]
  ]

Summary

Types

Functions

Link to this function

assign_current_user(conn, user)

View Source
@spec assign_current_user(Plug.Conn.t(), user()) :: Plug.Conn.t()
@spec authenticated?(Plug.Conn.t()) :: boolean()
Link to this macro

authentication_routes()

View Source (macro)
@spec current_user(Plug.Conn.t()) :: user()