Search documentation of phoenix_kit

# PhoenixKitWeb.Router (phoenix_kit v1.7.87)

Copy Markdown View Source

PhoenixKit library router.

This router is used only for development and testing purposes. In production, parent applications should use `phoenix_kit_routes()` macro to integrate PhoenixKit routes into their own router.

## Usage in Parent Application

    defmodule MyAppWeb.Router do
      use MyAppWeb, :router
      import PhoenixKitWeb.Integration

      # Add PhoenixKit routes
      phoenix_kit_routes()
    end

## Summary

### Functions

browser(conn, _)
call(conn, opts)

Callback invoked by Plug on every request.

formatted_routes(_)

Callback implementation for `Phoenix.VerifiedRoutes.formatted_routes/1`.

init(opts)

Callback required by Plug that initializes the router for serving web requests.

phoenix_kit_admin_only(conn, _)
phoenix_kit_api(conn, _)
phoenix_kit_auto_setup(conn, _)
phoenix_kit_locale_validation(conn, _)
phoenix_kit_optional_scope(conn, _)
phoenix_kit_redirect_if_authenticated(conn, _)
phoenix_kit_require_authenticated(conn, _)
verified_route?(_, split_path)

Callback implementation for `Phoenix.VerifiedRoutes.verified_route?/2`.

## Functions

# browser(conn, _)

# call(conn, opts)

Callback invoked by Plug on every request.

# formatted_routes(_)

Callback implementation for `Phoenix.VerifiedRoutes.formatted_routes/1`.

# init(opts)

Callback required by Plug that initializes the router for serving web requests.

# phoenix_kit_admin_only(conn, _)

# phoenix_kit_api(conn, _)

# phoenix_kit_auto_setup(conn, _)

# phoenix_kit_locale_validation(conn, _)

# phoenix_kit_optional_scope(conn, _)

# phoenix_kit_redirect_if_authenticated(conn, _)

# phoenix_kit_require_authenticated(conn, _)

# verified_route?(_, split_path)

Callback implementation for `Phoenix.VerifiedRoutes.verified_route?/2`.