-
Notifications
You must be signed in to change notification settings - Fork 0
/
amelinium.api.controller.user.html
26 lines (26 loc) · 30.8 KB
/
amelinium.api.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
24
25
26
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>amelinium.api.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 current"><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"><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.api.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.api.controller.user.html#var-authenticate.21"><div class="inner"><span>authenticate!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-authenticate-only.21"><div class="inner"><span>authenticate-only!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-create.21"><div class="inner"><span>create!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-edit.21"><div class="inner"><span>edit!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-five-minutes"><div class="inner"><span>five-minutes</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-identity.21"><div class="inner"><span>identity!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-identity-create.21"><div class="inner"><span>identity-create!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-identity-edit.21"><div class="inner"><span>identity-edit!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-info.21"><div class="inner"><span>info!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-one-minute"><div class="inner"><span>one-minute</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-password-change.21"><div class="inner"><span>password-change!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-password-create.21"><div class="inner"><span>password-create!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-password-recover.21"><div class="inner"><span>password-recover!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-recovery-create.21"><div class="inner"><span>recovery-create!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-register.21"><div class="inner"><span>register!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-resend.21"><div class="inner"><span>resend!</span></div></a></li><li class="depth-1"><a href="amelinium.api.controller.user.html#var-retry-after"><div class="inner"><span>retry-after</span></div></a></li><li class="depth-1"><a href="amelinium.api.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.api.controller.user</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>amelinium service, API 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-mode)</code><code>(auth-with-password! req user-email password sess route-data lang auth-only-mode session-key)</code></div><div class="doc"><div class="markdown"><p>Authentication helper. Used by other controllers. Short-circuits on certain conditions and may render a response.</p>
<p>Initial session <code>sess</code> will serve as a configuration source to create a new session and inject it into a request map <code>req</code> under configured session key.</p>
<p>Session status will be added to a response body (under the <code>:response/body</code> key of the processed request map) and the detected or given language will be set in using <code>amelinium.http.middleware.language/force</code> on the returned request map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L52">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 database connection, client IP address and authentication configuration from it. Also gets a user e-mail and a password from a map associated with the <code>:parameters</code> key and then with <code>:form</code> key of the <code>req</code>. Calls <code>auth-with-password!</code> to get the result or a redirect if 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 password authentication is not performed but instead the validity of a session is tested. If the detected session is valid then the given request map is returned as is.</p>
<p>If there was no login nor password given and the session is invalid then a redirect to a login page is performed. Its destination URL is obtained via a route name taken from the <code>:auth/info</code> key of a route data, or from the <code>:auth/info</code> route identifier (as a default fallback).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L86">view source</a></div></div><div class="public anchor" id="var-authenticate-only.21"><h3>authenticate-only!</h3><div class="usage"><code>(authenticate-only! req)</code></div><div class="doc"><div class="markdown"><p>Logs user in when user e-mail and password are given.</p>
<p>Takes a request map and obtains a database connection, client IP address and authentication configuration from it. Also gets user’s e-mail and a password from a map associated with the <code>:parameters</code> key and then <code>:form</code> key of the <code>req</code>. Calls <code>amelinium.common.controller/auth-user-with-password!</code> to get the authentication result with <code>auth-only-mode</code> argument set to <code>true</code>.</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 authentication is not performed.</p>
<p>Contrary to the <code>authenticate!</code>, session information is not checked nor injected into a prepared response body and a language is not forced.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L123">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 code or token against a database, and if it matches, creates a new user.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L431">view source</a></div></div><div class="public anchor" id="var-edit.21"><h3>edit!</h3><div class="usage"><code>(edit! req)</code><code>(edit! req session-key)</code></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/api/controller/user.clj#L297">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/api/controller/user.clj#L39">view source</a></div></div><div class="public anchor" id="var-identity.21"><h3>identity!</h3><div class="usage"><code>(identity! req)</code><code>(identity! req session-key)</code></div><div class="doc"><div class="markdown"><p>Gets user’s identities.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L323">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 code or token against a database and if it matches, creates new identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L390">view source</a></div></div><div class="public anchor" id="var-identity-edit.21"><h3>identity-edit!</h3><div class="usage"><code>(identity-edit! req)</code><code>(identity-edit! req session-key)</code></div><div class="doc"><div class="markdown"><p>Initiates process of changing user’s identity (e-mail or phone).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L336">view source</a></div></div><div class="public anchor" id="var-info.21"><h3>info!</h3><div class="usage"><code>(info! req)</code><code>(info! req session-key)</code></div><div class="doc"><div class="markdown"><p>Returns login information.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L145">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/api/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><code>(password-change! req session-key)</code><code>(password-change! req session-key session-invalidator)</code></div><div class="doc"><div class="markdown"><p>Changes a password for the user authenticated with an old password and a session token.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L465">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><code>(password-create! req session-key)</code><code>(password-create! req session-key session-invalidator)</code></div><div class="doc"><div class="markdown"><p>Sets new user password using a valid session and a current password OR recovery token or code and identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L566">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><code>(password-recover! req session-invalidator)</code></div><div class="doc"><div class="markdown"><p>Sets password for a user authenticated with the given recovery key or code and identity (an e-mail or a phone number).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L493">view source</a></div></div><div class="public anchor" id="var-recovery-create.21"><h3>recovery-create!</h3><div class="usage"><code>(recovery-create! req)</code></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/api/controller/user.clj#L530">view source</a></div></div><div class="public anchor" id="var-register.21"><h3>register!</h3><div class="usage"><code>(register! req)</code></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/api/controller/user.clj#L277">view source</a></div></div><div class="public anchor" id="var-resend.21"><h3>resend!</h3><div class="usage"><code>(resend! req reason)</code></div><div class="doc"><div class="markdown"><p>Re-sends verification e-mail or SMS to confirm the given identity when creating new account.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L243">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/api/controller/user.clj#L47">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 lang translator route-data], :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.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/api/controller/user.clj#L163">view source</a></div></div></div></body></html>