API Reference kratos_plug v0.1.0

modules

Modules

Functions for working with kratos sessions. This functionality expects that a kratos session has been previously fetched and stored in Plug.Conn.assigns.

Module for configuration. KratosPlug.Config type is compatible with Plug.opts().

A collection of functions that return default values.

Types and functions for session identifiers. Identifiers are the client secret that may be given to kratos in return for a session.

Behaviour to implement a Kratos session request.

A tesla-hackney adapter for the KratosPlug.KratosClient behaviour.

A module plug that ensures a valid Kratos session is present on the conn. If one is not present, the pipeline will halt and an error code added.

This pipeline is used to authenticate incoming requests using the kratos native flow. Options given to this pipeline will be passed unaltered to each of the plugs within it. Adding this pipeline to your router is the the prefered way to use KratosPlug.

Plug extracts all session identifiers from the conn request and attempts to fetch a session from kratos. When a session is found, it is assigned to the conn.