mix oidcc_plug.gen.controller (Oidcc Plug v0.3.0)

View Source

Generate an auth controller for your OpenID provider

Generates an auth controller that starts the OpenID Connect flow and handles the result. Additionally, it will add the routes to your router.

Example

mix oidcc.gen.controller \
  --name MyApp.AuthController \
  --provider MyApp.OpenIDProvider \
  --base-url /auth \
  --issuer https://account.google.com \
  --client-id client-id

Options

  • --name or -n - Name of the controller
  • --provider or -p - Name of the OpenID Provider
  • --base-url or -b - Base URL for the controller
  • --issuer or -i - Issuer URL of the OpenID Provider
  • --client-id - Client ID for the OpenID Provider
  • --client-secret - Client Secret for the OpenID Provider