-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio.randomseed.utils.identity.proto.html
More file actions
25 lines (25 loc) · 22.9 KB
/
Copy pathio.randomseed.utils.identity.proto.html
File metadata and controls
25 lines (25 loc) · 22.9 KB
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
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.identity.proto 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">Random:utils</span> <span class="project-version">2.0.11</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></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></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>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.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-5"><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-6 branch"><a href="io.randomseed.utils.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-6 branch"><a href="io.randomseed.utils.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-6 branch"><a href="io.randomseed.utils.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-6"><a href="io.randomseed.utils.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-5 branch"><a href="io.randomseed.utils.auth.locking.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>locking</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.auth.pwd.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.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-5"><a href="io.randomseed.utils.auth.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.crypto.codecs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>codecs</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.db.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-5 branch"><a href="io.randomseed.utils.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-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-6 branch"><a href="io.randomseed.utils.db.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-6"><a href="io.randomseed.utils.db.types.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.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-5 branch current"><a href="io.randomseed.utils.identity.proto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>proto</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.identity.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.log.logback.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logback</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.qe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>qe</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.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-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.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-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</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="io.randomseed.utils.identity.proto.html#var-add-acceptable-type.21"><div class="inner"><span>add-acceptable-type!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-add-subtype.21"><div class="inner"><span>add-subtype!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-add-type.21"><div class="inner"><span>add-type!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-add-type-string-matcher.21"><div class="inner"><span>add-type-string-matcher!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-del-subtype.21"><div class="inner"><span>del-subtype!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-del-type.21"><div class="inner"><span>del-type!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-del-type-string-matcher.21"><div class="inner"><span>del-type-string-matcher!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-Identifiable"><div class="inner"><span>Identifiable</span></div></a></li><li class="depth-2 branch"><a href="io.randomseed.utils.identity.proto.html#var-literal.3F"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>literal?</span></div></a></li><li class="depth-2 branch"><a href="io.randomseed.utils.identity.proto.html#var-make"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>make</span></div></a></li><li class="depth-2 branch"><a href="io.randomseed.utils.identity.proto.html#var-type"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>type</span></div></a></li><li class="depth-2"><a href="io.randomseed.utils.identity.proto.html#var-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>value</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-prioritized-types"><div class="inner"><span>prioritized-types</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-type-hierarchy"><div class="inner"><span>type-hierarchy</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-type-string-match"><div class="inner"><span>type-string-match</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-type-string-matchers"><div class="inner"><span>type-string-matchers</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-unaccept-type.21"><div class="inner"><span>unaccept-type!</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.identity.proto.html#var-valid-types"><div class="inner"><span>valid-types</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.identity.proto</h1><h4 class="added">added in 2.0.7</h4><div class="doc"><div class="markdown"><p>Random Utilities, user identity protocols.</p>
</div></div><div class="public anchor" id="var-add-acceptable-type.21"><h3>add-acceptable-type!</h3><div class="usage"><code>(add-acceptable-type! acceptable-tag t)</code><code>(add-acceptable-type! acceptable-tag t & more)</code></div><div class="doc"><div class="markdown"><p>For the given parent tag <code>acceptable-tag</code> (which should be a qualified keyword) and an identity type <code>t</code>, creates a relation so that the identity type is a descendant of the given parent. It also ensures that the parent itself is a descendant of <code>:io.randomseed.utils.identity/valid</code> tag.</p>
<p>Useful when there is a need to accept a limited set of recognized identity types. Then the detection function can check whether an identity belongs to a parent.</p>
<p>Makes changes in the global identity type hierarchy <code>io.randomseed.utils.identity.proto/type-hierarchy</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L106">view source</a></div></div><div class="public anchor" id="var-add-subtype.21"><h3>add-subtype!</h3><div class="usage"><code>(add-subtype! parent t)</code><code>(add-subtype! parent t & more)</code></div><div class="doc"><div class="markdown"><p>Adds an identity type <code>t</code> as a subtype of a tag <code>parent</code>. Multiple types can be given. Updates the global identity type hierarchy <code>io.randomseed.utils.identity.proto/type-hierarchy</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L80">view source</a></div></div><div class="public anchor" id="var-add-type.21"><h3>add-type!</h3><div class="usage"><code>(add-type! t)</code><code>(add-type! t & more)</code></div><div class="doc"><div class="markdown"><p>Adds a new identity type to the global identity type hierarchy <code>io.randomseed.utils.identity.proto/type-hierarchy</code> and marks it as valid.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L94">view source</a></div></div><div class="public anchor" id="var-add-type-string-matcher.21"><h3>add-type-string-matcher!</h3><div class="usage"><code>(add-type-string-matcher! f)</code><code>(add-type-string-matcher! f & more)</code></div><div class="doc"><div class="markdown"><p>Adds new identity type string matcher to a global chain. Multiple functions may be given. Each function should accept an input and optional identity type. If the identity type is given then it will be used as a hint to check whether this matcher should be applied.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L171">view source</a></div></div><div class="public anchor" id="var-del-subtype.21"><h3>del-subtype!</h3><div class="usage"><code>(del-subtype! parent t)</code><code>(del-subtype! parent t & more)</code></div><div class="doc"><div class="markdown"><p>Removes an identity type <code>t</code> from being a subtype of a tag <code>parent</code>. Multiple types can be given. Updates the global identity type hierarchy <code>io.randomseed.utils.identity.proto/type-hierarchy</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L87">view source</a></div></div><div class="public anchor" id="var-del-type.21"><h3>del-type!</h3><div class="usage"><code>(del-type! t)</code><code>(del-type! t & more)</code></div><div class="doc"><div class="markdown"><p>Removes an identity type from the global identity type hierarchy <code>io.randomseed.utils.identity.proto/type-hierarchy</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L100">view source</a></div></div><div class="public anchor" id="var-del-type-string-matcher.21"><h3>del-type-string-matcher!</h3><div class="usage"><code>(del-type-string-matcher! n)</code><code>(del-type-string-matcher! n & more)</code></div><div class="doc"><div class="markdown"><p>Deletes identity type string matcher of the given index <code>n</code> from a global chain. Multiple indexes may be given.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L191">view source</a></div></div><div class="public anchor" id="var-Identifiable"><h3>Identifiable</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>This protocol allows to extend known identity types.</p>
</div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-literal.3F"><h3>literal?</h3><div class="usage"><code>(literal? user-identity)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if the given literal can express identity.</p>
</div></div></div><div class="public anchor" id="var-make"><h3>make</h3><div class="usage"><code>(make user-identity)</code><code>(make user-identity identity-type)</code></div><div class="doc"><div class="markdown"><p>Creates <code>io.randomseed.utils.identity.types.Identity</code> record by detecting identity type and parsing the identity. If <code>identity-type</code> is given, parsing for the given identity type will be called explicitly. If a parent tag for identity types is given, it will be used to parse and constrain the type.</p>
<p>For the <code>Identity</code> record it simply returns it unless the <code>identity-type</code> is given and it differs from a value of its <code>:id-type</code> field.</p>
</div></div></div><div class="public anchor" id="var-type"><h3>type</h3><div class="usage"><code>(type user-identity)</code><code>(type user-identity identity-type)</code></div><div class="doc"><div class="markdown"><p>Returns a keyword describing identity type detected by analyzing the given value (<code>:phone</code> for a phone number, <code>:email</code> for e-mail address, <code>:id</code> for numeric user ID, <code>:uid</code> for UUID). If <code>identity-type</code> or a parent tag for identity types is given, detection functions for the given identity type or (a tag-grouped) identity types will be cherry-picked and result will be constrained to it. Does not perform full validation, just detection.</p>
</div></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"><code>(value user-identity)</code><code>(value user-identity identity-type)</code></div><div class="doc"><div class="markdown"><p>Returns a value of the given identity which is an object which represents it best. If <code>identity-type</code> is given, parsing for the given identity type will be called explicitly. If a parent tag for identity types is given, it will be used to parse and constrain the type.</p>
</div></div></div></div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L135">view source</a></div></div><div class="public anchor" id="var-prioritized-types"><h3>prioritized-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Prioritized identity types. If they appear on a <code>valid-types</code> list, they will be placed at the beginning.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L44">view source</a></div></div><div class="public anchor" id="var-type-hierarchy"><h3>type-hierarchy</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A type hierarchy for identity types expressed as unqualified and qualified keywords. Any tag derived from <code>:io.randomseed.utils.identity/valid</code> will be considered valid.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L21">view source</a></div></div><div class="public anchor" id="var-type-string-match"><h3>type-string-match</h3><div class="usage"><code>(type-string-match v)</code><code>(type-string-match v t)</code></div><div class="doc"><div class="markdown"><p>Internal function for matching strings on a basis of <code>type-string-matchers</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L32">view source</a></div></div><div class="public anchor" id="var-type-string-matchers"><h3>type-string-matchers</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity string matchers repository. A vector of functions executed in a sequence until one will return anything but <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L27">view source</a></div></div><div class="public anchor" id="var-unaccept-type.21"><h3>unaccept-type!</h3><div class="usage"><code>(unaccept-type! acceptable-tag t)</code><code>(unaccept-type! acceptable-tag t & more)</code></div><div class="doc"><div class="markdown"><p>Removes identity type <code>t</code> from the given parent <code>acceptable-tag</code>. Makes changes in the global identity type hierarchy <code>io.randomseed.utils.identity.proto/type-hierarchy</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L127">view source</a></div></div><div class="public anchor" id="var-valid-types"><h3>valid-types</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>List of valid types, regenerated each time types are added or deleted.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/identity/src/io/randomseed/utils/identity/proto.clj#L39">view source</a></div></div></div></body></html>