Document furnace.auth.features

db4
Slava Pestov 2008-11-16 07:41:27 -06:00
parent c0a38be8cc
commit 4a40b03a10
7 changed files with 110 additions and 4 deletions

View File

@ -0,0 +1,26 @@
USING: help.markup help.syntax kernel ;
IN: furnace.auth.features.deactivate-user
HELP: allow-deactivation
{ $values { "realm" "an authentication realm" } }
{ $description "Adds a " { $snippet "deactivate-user" } " action to an authentication realm." } ;
HELP: allow-deactivation?
{ $values { "?" "a boolean" } }
{ $description "Outputs true if the current authentication realm allows user profile deactivation." } ;
ARTICLE: "furnace.auth.features.deactivate-user" "User profile deactivation"
"The " { $vocab-link "furnace.auth.features.deactivate-user" } " vocabulary implements an authentication feature for user profile deactivation, allowing users to voluntarily deactivate their account."
$nl
"To enable this feature, call the following word on an authentication realm:"
{ $subsection allow-deactivation }
"To check if deactivation is enabled:"
{ $subsection allow-deactivation? }
"This feature adds a " { $snippet "deactivate-user" } " action to the realm, and a link to this action can be inserted in Chloe templates using the following XML snippet:"
{ $code
"<t:if t:code=\"furnace.auth.features.deactivate-user:allow-deactivation?\">"
" <t:button t:action=\"$realm/deactivate-user\">Deactivate user</t:button>"
"</t:if>"
} ;
ABOUT: "furnace.auth.features.deactivate-user"

View File

@ -0,0 +1,24 @@
USING: help.markup help.syntax kernel ;
IN: furnace.auth.features.edit-profile
HELP: allow-edit-profile
{ $values { "realm" "an authentication realm" } }
{ $description "Adds an " { $snippet "edit-profile" } " action to an authentication realm." } ;
HELP: allow-edit-profile?
{ $values { "?" "a boolean" } }
{ $description "Outputs true if the current authentication realm allows user profile editing." } ;
ARTICLE: "furnace.auth.features.edit-profile" "User profile editing"
"The " { $vocab-link "furnace.auth.features.edit-profile" } " vocabulary implements an authentication feature for user profile editing, allowing users to change some details of their account."
$nl
"To enable this feature, call the following word on an authentication realm:"
{ $subsection allow-edit-profile }
"To check if profile editing is enabled:"
{ $subsection allow-edit-profile? }
"This feature adds an " { $snippet "edit-profile" } " action to the realm, and a link to this action can be inserted in Chloe templates using the following XML snippet:"
{ $code
"<t:if t:code=\"furnace.auth.features.edit-profile:allow-edit-profile?\">"
" <t:button t:action=\"$realm/edit-profile\">Edit profile</t:button>"
"</t:if>"
} ;

View File

@ -58,7 +58,7 @@ IN: furnace.auth.features.edit-profile
<protected>
"edit your profile" >>description ;
: allow-edit-profile ( login -- login )
: allow-edit-profile ( realm -- realm )
<edit-profile-action> <auth-boilerplate> "edit-profile" add-responder ;
: allow-edit-profile? ( -- ? )

View File

@ -0,0 +1,34 @@
USING: help.markup help.syntax kernel strings urls ;
IN: furnace.auth.features.recover-password
HELP: allow-password-recovery
{ $values { "realm" "an authentication realm" } }
{ $description "Adds a " { $snippet "recover-password" } " action to an authentication realm." } ;
HELP: allow-password-recovery?
{ $values { "?" "a boolean" } }
{ $description "Outputs true if the current authentication realm allows user password recovery." } ;
HELP: lost-password-from
{ $var-description "A variable with the source e-mail address of password recovery e-mails." } ;
ARTICLE: "furnace.auth.features.recover-password" "User password recovery"
"The " { $vocab-link "furnace.auth.features.recover-password" }
" 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."
$nl
"To enable this feature, first call the following word on an authentication realm,"
{ $subsection allow-password-recovery }
"Then set a global configuration variable:"
{ $subsection lost-password-from }
"In addition, the " { $link "smtp" } " may need to be configured as well."
$nl
"To check if password recovery is enabled:"
{ $subsection allow-password-recovery? }
"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:"
{ $code
"<t:if t:code=\"furnace.auth.features.recover-password:allow-password-recovery?\">"
" <t:button t:action=\"$realm/recover-password\">Recover password</t:button>"
"</t:if>"
} ;
ABOUT: "furnace.auth.features.recover-password"

View File

@ -0,0 +1,24 @@
USING: help.markup help.syntax kernel ;
IN: furnace.auth.features.registration
HELP: allow-registration
{ $values { "realm" "an authentication realm" } }
{ $description "Adds a " { $snippet "registration" } " action to an authentication realm." } ;
HELP: allow-registration?
{ $values { "?" "a boolean" } }
{ $description "Outputs true if the current authentication realm allows user registration." } ;
ARTICLE: "furnace.auth.features.registration" "User registration"
"The " { $vocab-link "furnace.auth.features.registration" } " vocabulary implements an authentication feature for user registration, allowing new users to create accounts."
$nl
"To enable this feature, call the following word on an authentication realm:"
{ $subsection allow-registration }
"To check if user registration is enabled:"
{ $subsection allow-registration? }
"This feature adds a " { $snippet "register" } " action to the realm. A link to this action is inserted on the login page if the " { $vocab-link "furnace.auth.login" } " authentication realm is used. Links to this action can be inserted from other pages using the following Chloe XML snippet:"
{ $code
"<t:if t:code=\"furnace.auth.features.registration:allow-registration?\">"
" <t:button t:action=\"$realm/register\">Register</t:button>"
"</t:if>"
} ;

View File

@ -38,7 +38,7 @@ IN: furnace.auth.features.registration
<auth-boilerplate>
<secure-realm-only> ;
: allow-registration ( login -- login )
: allow-registration ( realm -- realm )
<register-action> "register" add-responder ;
: allow-registration? ( -- ? )

View File

@ -1,5 +1,3 @@
! Copyright (C) 2008 Your name.
! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax kernel strings ;
IN: furnace.auth.login