[{"name":"AuthAPI","comment":" AuthAPI defines an extensible API for interacting with authentication.\nIt provides the most common authentication commands that applications need, and\nleaves room for implementations to extend the set of commands to cater for\nvariations in the behaviour of authentication services.\n\nIn particular the `Status` type defines a `Challenged` state which has a `chal`\ntype variable, but there are no commands for answering challenges. Some\nimplementations that do not have challenges will use the `Never` type for this,\nand other implementations with support for things such as 2-factor authentication\nwill supply an appropriate challenge type and commands to answer challenges.\n\n\n# The authentication API.\n\n@docs AuthAPI, Credentials, Status\n\n","unions":[{"name":"Status","comment":" The visible status of the authentication model.\n","args":["chal"],"cases":[["LoggedOut",[]],["LoggedIn",["{ scopes : List.List String.String, subject : String.String }"]],["Failed",[]],["Challenged",["chal"]]]}],"aliases":[{"name":"AuthAPI","comment":" The extensible authentication API.\n\nThis is presented as functions in an extensible record. The reason for this\nslightly unusual presentation is that it allows a type to be defined for the\nwhole API, with all the parts that are variable amongst implementations presented\nas type variables.\n\nThis allows multiple implementations of this API to be written that all conform\nto a common pattern. This standardizes how authentcation is handled in\napplications.\n\n","args":["config","model","msg","chal","ext"],"type":"{ ext | init : config -> Result.Result String.String model, login : AuthAPI.Credentials -> Platform.Cmd.Cmd msg, logout : Platform.Cmd.Cmd msg, unauthed : Platform.Cmd.Cmd msg, refresh : Platform.Cmd.Cmd msg, update : msg -> model -> ( model, Platform.Cmd.Cmd msg, Maybe.Maybe (AuthAPI.Status chal) ) }"},{"name":"Credentials","comment":" Username and password credentials.\n","args":[],"type":"{ username : String.String, password : String.String }"}],"values":[],"binops":[]}]