]> gitweb.factorcode.org Git - factor.git/blob - basis/furnace/auth/features/recover-password/recover-password-docs.factor
3248bb1952ed2fcd84e0c551f17d0d728112158c
[factor.git] / basis / furnace / auth / features / recover-password / recover-password-docs.factor
1 USING: help.markup help.syntax kernel strings urls ;
2 IN: furnace.auth.features.recover-password
3
4 HELP: allow-password-recovery
5 { $values { "realm" "an authentication realm" } }
6 { $description "Adds a " { $snippet "recover-password" } " action to an authentication realm." } ;
7
8 HELP: allow-password-recovery?
9 { $values { "?" boolean } }
10 { $description "Outputs true if the current authentication realm allows user password recovery." } ;
11
12 HELP: lost-password-from
13 { $var-description "A variable with the source e-mail address of password recovery e-mails." } ;
14
15 ARTICLE: "furnace.auth.features.recover-password" "User password recovery"
16 "The " { $vocab-link "furnace.auth.features.recover-password" }
17 " vocabulary implements an authentication feature for user password recovery, allowing users to get a new password e-mailed to them in the event they forget their current one."
18 $nl
19 "To enable this feature, first call the following word on an authentication realm,"
20 { $subsections allow-password-recovery }
21 "Then set a global configuration variable:"
22 { $subsections lost-password-from }
23 "In addition, the " { $link "smtp" } " may need to be configured as well."
24 $nl
25 "To check if password recovery is enabled:"
26 { $subsections allow-password-recovery? }
27 "This feature adds a " { $snippet "recover-password" } " action to the realm, and a link to this action can be inserted in Chloe templates using the following XML snippet:"
28 { $code
29     "<t:if t:code=\"furnace.auth.features.recover-password:allow-password-recovery?\">"
30     "    <t:button t:action=\"$realm/recover-password\">Recover password</t:button>"
31     "</t:if>"
32 } ;
33
34 ABOUT: "furnace.auth.features.recover-password"