-
Notifications
You must be signed in to change notification settings - Fork 0
/
amelinium.web.controller.user.html
23 lines (23 loc) · 30.6 KB
/
amelinium.web.controller.user.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>amelinium.web.controller.user documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Amelinium</span> <span class="project-version">1.0.1</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li><li class="depth-1 "><a href="20_hypermedia.html"><div class="inner"><span>Hypermedia-driven</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="amelinium.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>amelinium</span></div></a></li><li class="depth-2 branch"><a href="amelinium.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-2"><a href="amelinium.api.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>api</span></div></a></li><li class="depth-3"><a href="amelinium.api.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4"><a href="amelinium.api.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3"><a href="amelinium.api.url.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>url</span></div></a></li><li class="depth-2 branch"><a href="amelinium.app.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>app</span></div></a></li><li class="depth-2"><a href="amelinium.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>algo</span></div></div></li><li class="depth-4 branch"><a href="amelinium.auth.algo.append.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>append</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.fail.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fail</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.pbkdf2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pbkdf2</span></div></a></li><li class="depth-4"><a href="amelinium.auth.algo.scrypt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrypt</span></div></a></li><li class="depth-3 branch"><a href="amelinium.auth.pwd.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-3"><a href="amelinium.auth.specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>specs</span></div></a></li><li class="depth-2"><a href="amelinium.common.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-3"><a href="amelinium.common.oplog.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oplog</span></div></a></li><li class="depth-4"><a href="amelinium.common.oplog.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.populators.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-3"><a href="amelinium.common.swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swagger</span></div></a></li><li class="depth-2 branch"><a href="amelinium.core.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="amelinium.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3"><a href="amelinium.db.sql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sql</span></div></a></li><li class="depth-2 branch"><a href="amelinium.errors.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-2"><a href="amelinium.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>client</span></div></div></li><li class="depth-4"><a href="amelinium.http.client.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.handler.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-3"><a href="amelinium.http.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.coercion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercion</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.content.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>content</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.debug.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>debug</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.format.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>format</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.headers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>headers</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.language.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>language</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.lazy-req.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy-req</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.populators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.remote-ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>remote-ip</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.roles.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>roles</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-4"><a href="amelinium.http.middleware.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.router.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>router</span></div></a></li><li class="depth-3"><a href="amelinium.http.server.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.server.jetty.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>jetty</span></div></a></li><li class="depth-4"><a href="amelinium.http.server.undertow.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>undertow</span></div></a></li><li class="depth-2"><a href="amelinium.i18n.html"><div class="inner"><span class="tree" style="top: -672px;"><span class="top" style="height: 681px;"></span><span class="bottom"></span></span><span>i18n</span></div></a></li><li class="depth-3"><a href="amelinium.i18n.pluralizers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pluralizers</span></div></a></li><li class="depth-2 branch"><a href="amelinium.identity.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-2 branch"><a href="amelinium.locale.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>locale</span></div></a></li><li class="depth-2 branch"><a href="amelinium.logging.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logging</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>model</span></div></div></li><li class="depth-3 branch"><a href="amelinium.model.confirmation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>confirmation</span></div></a></li><li class="depth-3"><a href="amelinium.model.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>proto</span></div></div></li><li class="depth-3 branch"><a href="amelinium.proto.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.proto.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.schemas.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>schemas</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></div></li><li class="depth-3"><a href="amelinium.server.ssl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ssl</span></div></a></li><li class="depth-2 branch"><a href="amelinium.system.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>system</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></div></li><li class="depth-3 branch"><a href="amelinium.types.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.types.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.utils.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="amelinium.web.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>web</span></div></a></li><li class="depth-3"><a href="amelinium.web.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4 branch"><a href="amelinium.web.controller.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-4 current"><a href="amelinium.web.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.js.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>js</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.taggers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>taggers</span></div></a></li><li class="depth-3"><a href="amelinium.web.url.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>url</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="amelinium.web.controller.user.html#var-auth-with-password.21"><div class="inner"><span>auth-with-password!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-authenticate.21"><div class="inner"><span>authenticate!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-confirmation-status.21"><div class="inner"><span>confirmation-status!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-create.21"><div class="inner"><span>create!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-five-minutes"><div class="inner"><span>five-minutes</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-identity-create.21"><div class="inner"><span>identity-create!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-login.21"><div class="inner"><span>login!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-logout.21"><div class="inner"><span>logout!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-one-minute"><div class="inner"><span>one-minute</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-password-change.21"><div class="inner"><span>password-change!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-password-create.21"><div class="inner"><span>password-create!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-password-recover.21"><div class="inner"><span>password-recover!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-password-update.21"><div class="inner"><span>password-update!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-prolong.21"><div class="inner"><span>prolong!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-register.21"><div class="inner"><span>register!</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-retry-after"><div class="inner"><span>retry-after</span></div></a></li><li class="depth-1"><a href="amelinium.web.controller.user.html#var-verify.21"><div class="inner"><span>verify!</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">amelinium.web.controller.user</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>amelinium service, web user controller functions.</p>
</div></div><div class="public anchor" id="var-auth-with-password.21"><h3>auth-with-password!</h3><div class="usage"><code>(auth-with-password! req user-email password)</code><code>(auth-with-password! req user-email password sess)</code><code>(auth-with-password! req user-email password sess route-data)</code><code>(auth-with-password! req user-email password sess route-data lang)</code><code>(auth-with-password! req user-email password sess route-data lang auth-only?)</code><code>(auth-with-password! req user-email password sess route-data lang auth-only? session-key)</code></div><div class="doc"><div class="markdown"><p>Authentication helper. Used by other controllers. Short-circuits on certain conditions and may emit a redirect or render a response.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L191">view source</a></div></div><div class="public anchor" id="var-authenticate.21"><h3>authenticate!</h3><div class="usage"><code>(authenticate! req)</code><code>(authenticate! req session-key)</code></div><div class="doc"><div class="markdown"><p>Logs user in when user e-mail and password are given, or checks if the session is valid to serve a current page.</p>
<p>Takes a request map and obtains a database connection, a client IP address and an authentication configuration from it. Also gets user’s e-mail and a password from a map associated with the <code>:form-params</code> key of the <code>req</code>. Calls <code>auth-user-with-password!</code> to get the result or perform a redirect if the authentication was not successful.</p>
<p>If there is no e-mail nor password given (the value is <code>nil</code>, <code>false</code> or an empty string) then the authentication is not performed but instead the validity of a session is tested. If the session is invalid a redirect to the login page is performed; the destination URL is obtained by looking up the route data key <code>:auth/login</code> and taking a route name associated with it, or by visiting an URL associated with the <code>:login</code> route name (as default, when the previous lookup was not successful). If the destination path is parameterized with a language, the redirect will set this path parameter to a value obtained by calling the <code>web/pick-language-str</code>, using language detection chain identified by the <code>:user</code> key. The same language will be passed to the <code>auth-user-with-password!</code> call.</p>
<p>If the session is valid then the given request map is returned with the <code>:authenticated!</code> key set to <code>true</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L219">view source</a></div></div><div class="public anchor" id="var-confirmation-status.21"><h3>confirmation-status!</h3><div class="usage"><code>(confirmation-status! req)</code><code>(confirmation-status! req session-key)</code><code>(confirmation-status! req session-key reason)</code></div><div class="doc"><div class="markdown"><p>Renders status of identity confirmation on a basis of user’s identity and quick token obtained from form params. Identity type must belong to a group <code>:amelinium.identity/public</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L306">view source</a></div></div><div class="public anchor" id="var-create.21"><h3>create!</h3><div class="usage"><code>(create! req)</code></div><div class="doc"><div class="markdown"><p>Verifies confirmation token or code against a database and if it matches creates an account.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L384">view source</a></div></div><div class="public anchor" id="var-five-minutes"><h3>five-minutes</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L39">view source</a></div></div><div class="public anchor" id="var-identity-create.21"><h3>identity-create!</h3><div class="usage"><code>(identity-create! req)</code><code>(identity-create! req session-invalidator)</code></div><div class="doc"><div class="markdown"><p>Verifies confirmation token against a database and if it matches, updates the identity (phone or e-mail).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L421">view source</a></div></div><div class="public anchor" id="var-login.21"><h3>login!</h3><div class="usage"><code>(login! req)</code><code>(login! req session-key)</code></div><div class="doc"><div class="markdown"><p>Prepares response data to be displayed on a login page.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L260">view source</a></div></div><div class="public anchor" id="var-logout.21"><h3>logout!</h3><div class="usage"><code>(logout! req)</code><code>(logout! req session-key)</code></div><div class="doc"><div class="markdown"><p>Logs user out.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L269">view source</a></div></div><div class="public anchor" id="var-one-minute"><h3>one-minute</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L38">view source</a></div></div><div class="public anchor" id="var-password-change.21"><h3>password-change!</h3><div class="usage"><code>(password-change! req)</code></div><div class="doc"><div class="markdown"><p>Changes password for the user authenticated with an old password and e-mail or sets the password for the given <code>user-id</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L486">view source</a></div></div><div class="public anchor" id="var-password-create.21"><h3>password-create!</h3><div class="usage"><code>(password-create! req)</code></div><div class="doc"><div class="markdown"><p>Creates a password on a basis of a token, or on a basis of a code and identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L635">view source</a></div></div><div class="public anchor" id="var-password-recover.21"><h3>password-recover!</h3><div class="usage"><code>(password-recover! req)</code></div><div class="doc"><div class="markdown"><p>Initiates password recovery by sending an e-mail or SMS message with a verification code or token.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L508">view source</a></div></div><div class="public anchor" id="var-password-update.21"><h3>password-update!</h3><div class="usage"><code>(password-update! req)</code></div><div class="doc"><div class="markdown"><p>Displays password setting form for a user authenticated with token or code.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L549">view source</a></div></div><div class="public anchor" id="var-prolong.21"><h3>prolong!</h3><div class="usage"><code>(prolong! req)</code><code>(prolong! req session-key)</code></div><div class="doc"><div class="markdown"><p>Prepares response data to be displayed on a prolongation page.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L283">view source</a></div></div><div class="public anchor" id="var-register.21"><h3>register!</h3><div class="usage"><code>(register! req)</code><code>(register! req session-key)</code></div><div class="doc"><div class="markdown"><p>Initiates user registration process by receiving e-mail, password and name.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L350">view source</a></div></div><div class="public anchor" id="var-retry-after"><h3>retry-after</h3><div class="usage"><code>(retry-after expires)</code></div><div class="doc"><div class="markdown"><p>Returns an expiration date and time formatted according to the RFC 1123.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L41">view source</a></div></div><div class="public anchor" id="var-verify.21"><h3>verify!</h3><div class="usage"><code>(verify! req {:keys [no-data result reason db id id-type confirm-once? lang translator route-data], :or {confirm-once? true}, :as opts})</code></div><div class="doc"><div class="markdown"><p>Performs the identity verification by sending an e-mail or SMS with a URL to complete confirmation. Takes a request map <code>req</code> and configuration options as a map with the following keys:</p>
<p><code>:db</code> - database connection handler or a data source object, <code>:id</code> - identity used for verification (e-mail address or a phone number), <code>:id-type</code> - identity type (<code>:email</code> or <code>:phone</code>), <code>:lang</code> - language (defaults to a result of <code>common/pick-language</code>), <code>:reason</code> – verification reason (<code>:creation</code>, <code>:recovery</code>, <code>:change</code>, <code>:unlock</code>), <code>:no-data</code> - status to be set when there is no result from a database (default: <code>:verify/bad-result</code>), <code>:result</code> - a result of calling confirmation function from a model, <code>:translator</code> - translation function (defaults to a result of <code>amelinium.common/translator</code>), <code>:route-data</code> - route data (defaults to a result of calling <code>amelinium.http/get-route-data</code>), <code>:confirm-once?</code> - if truthy (default) then existing confirmation will cause error response, <code>:async/responder</code> - asynchronous response handler for Twilio client (default: <code>amelinium.common.controller/verify-request-id-update</code>), <code>:async/raiser</code> - asynchronous error handler for Twilio client (default: <code>amelinium.common.controller/verify-process-error</code>).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/web/controller/user.clj#L46">view source</a></div></div></div></body></html>