copious-transitions
Version:
Framework for working with frameworks
3,708 lines (995 loc) • 50.3 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: SessionManager_Lite</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: SessionManager_Lite</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>
<span class="ancestors"><a href="base.html">base</a>.</span>SessionManager_Lite<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description"><p>Provides a subset of methods required for authorization and authorized transition processing.
Makes use of established sessions, transition tokens in order to set actual transition operations into action.</p>
<p>Not to forget that this is a client facing class. The purpose of this class is to provide the basic methods (abstractly in most cases)
for the management of authorization and allowing access to authorized processes. This class provide guards, matching, and calls out to
backend (e.g. transitions engine) processes such as finalization of the state transition, queries as to the feasibility of
state transitions, and setting up transitions or providing access to assets, either static or computed (dynamic).</p>
<p>As this is client facing, access is provided to the middleware and the web application class instance.</p>
<p>This class has access to the business class (which may be useful in some applications) and to the transition engine.
Most applications will have some specialization of the transition engine. The transition engine will most likely be called upon
during transition finalization, but may be use to prepare for the transition as well.</p>
<p>For the most part, the class manages the lifecycle of a transition object. The associated transition token may be of use, but
the token is managed by the contractual classes utilized by the class CopiousTransitions found in <code>user_service_class.js</code>.</p>
<p>NOTE: all the base classes in /lib return the class and do not return an instance. Explore the applications and
the reader will find that the descendant modules export instances. The classes provided by copious-transitions must
be extended by an application.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="SessionManager_Lite"><span class="type-signature"></span>new SessionManager_Lite<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line39">line 39</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="app_user_check_cookie"><span class="type-signature"></span>app_user_check_cookie<span class="signature">(req, session_token)</span><span class="type-signature"></span></h4>
<div class="description">
<p>These method allow for implementations to manage cookies when dealing with browsers</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>session_token</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line381">line 381</a>
</li></ul></dd>
</dl>
<h4 class="name" id="cipher"><span class="type-signature">(async) </span>cipher<span class="signature">(clear_text, aes_key)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
<p>Override this method to use the application specific key format and run
the cipher picked by the application.</p>
<p>The method is left abstract. It does not place any condition on the kind of cipher nor the format in which the cipher is passed.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>clear_text</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>aes_key</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>an AES key (or other) in a format that may be consumed by descendant library users</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line150">line 150</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>the clear (deciphered) text</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="create_transition_record"><span class="type-signature"></span>create_transition_record<span class="signature">(t_type, sub_type)</span><span class="type-signature"> → {object}</span></h4>
<div class="description">
<p>The transition type is passed in as a parameter to the
transition object constructor.</p>
<p>The subtype parameter is used to identify the class of the constructor.
Take note that just a few types have their own classes. These are mostly for session management transitions.</p>
<p>The <code>true transition</code> subtype is for actual state machine or Petri net travel occuring in generalized transition engines.
All others are application specific with subtypes developed separately for each process.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>t_type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>sub_type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line88">line 88</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>the transition object</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id="extract_exposable_user_info"><span class="type-signature"></span>extract_exposable_user_info<span class="signature">(user, info)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>user</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>a DB record representing a user</p></td>
</tr>
<tr>
<td class="name"><code>info</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>application specific information that may be used with the user data to extract information.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line124">line 124</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>returns some user information -- default is the name</li>
</ul>
</div>
<h4 class="name" id="feasible"><span class="type-signature"></span>feasible<span class="signature">(transition, post_body, req)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>If a client request has access to a transition (state machine, Petri net), then one more kind of check will
be employed. In this case, the transition is checked for feasibility; that is, the transition request may be limited in
resoures it may use or it may not be supported computationally by the host machine.</p>
<p>Many types of applications may check feasibility in particular ways. For example, one application may check on rate limiting
for certain transitions. Another, might check a balance. A fairly general check might be that a requested state transition targets
an existing final state. One use already being used is to check if a signature can be verified with server side session data.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>transition</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>post_body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>This is the request object sent by the client</p></td>
</tr>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>This is request object derived from the HTTP header</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line198">line 198</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>true indicates feasibility</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="finalize_transition"><span class="type-signature"></span>finalize_transition<span class="signature">(transition, post_body, elements, req)</span><span class="type-signature"> → {object}</span></h4>
<div class="description">
<p>Primary transitions that do not require seconday responses from the client and secondary transition processing may
determine that a transition may be finalized. That is, a transition may be recorded as having completed allowing
for the process to settle into a new state.</p>
<p>This method returns an object that indicates the state of the machine. The entirety of this object will be passed on
to the client.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>transition</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>post_body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>elements</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line322">line 322</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>data destined to the client and with a report as to the state of the machine relative to the client</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id="gen_wrapped_key"><span class="type-signature">(async) </span>gen_wrapped_key<span class="signature">(wrapper_public_key)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
<p>A method that returns a wrapped key after generating it.
This method is left as abstract.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>wrapper_public_key</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>a wrapper key</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line136">line 136</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>an empty string by default - the application sould override this method.</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="guard"><span class="type-signature">(async) </span>guard<span class="signature">(asset, body, req)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>This method intercepts requests that require processing, including dynamically generated assests and
state transitions.</p>
<p>The guard method at a minimum will check to see if the CopiousTransitions innstance is checking for https
and provide the check if it is.</p>
<p>There may be applications that provide a complex and calculated checks. But, in most cases, the checks wil be rapid
and sufficient for the request to be accepted or rejected in a timely manner for the client.</p>
<p>Some applications may want to provide use of an ACL subprocess at this point.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>asset</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>idenitifies the asset that is being accessed.</p></td>
</tr>
<tr>
<td class="name"><code>body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>This is the request object sent by the client</p></td>
</tr>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>This is request object derived from the HTTP header</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line172">line 172</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>true allows passage</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="guard_static"><span class="type-signature">(async) </span>guard_static<span class="signature">(asset, body, req)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>This guard, the static guard, is similar to the more general <code>guard</code> method. But, some implementations may be paired down
considerably knowing that the asset being accessed will be some static file. In particular, the file might have been preloaded.
Rate limiting might also be checked in the guard.</p>
<p>Usually, this method will access the static assets module to make queries about assets.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>asset</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line216">line 216</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>true allows passage</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="handle_cookies"><span class="type-signature"></span>handle_cookies<span class="signature">(result, res, transitionObj)</span><span class="type-signature"></span></h4>
<div class="description">
<p>These method allow for implementations to manage cookies when dealing with browsers</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>res</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>transitionObj</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line390">line 390</a>
</li></ul></dd>
</dl>
<h4 class="name" id="key_for_user"><span class="type-signature"></span>key_for_user<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
<p>This is a key that may be set by the application. Generic code will not know the name of a field in a DB
nor in objects received from the client. An application can override this method and let the generic methods operated with ti.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line242">line 242</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>a field name for accessing keys to user data</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="match"><span class="type-signature"></span>match<span class="signature">(post_body, transtion_object)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>The match method is employed during a secondary transition phase of a transition or in secondary user processing (access management).</p>
<p>The default case is for the client to post a body with a field <code>_t_match_field</code>. This field is compared to a <code>match</code> field stored
in the elements sub-object of a chached transition object, one that has been created during the first phase of transition
processing.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>post_body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>transtion_object</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line258">line 258</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>true for successful matching</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="post_body_decode"><span class="type-signature"></span>post_body_decode<span class="signature">(udata)</span><span class="type-signature"> → {object}</span></h4>
<div class="description">
<p>Decodes fields from URI encoded to regular text</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>udata</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line225">line 225</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>the updated (decoded fields) of the user data object passed</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id="process_asset"><span class="type-signature"></span>process_asset<span class="signature">(asset_id, post_body)</span><span class="type-signature"> → {object}</span></h4>
<div class="description">
<p>This method generates a transition object for tracking the access to a guarded asset of some time.
The transition object generated is not applied to a transition.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>asset_id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>post_body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line278">line 278</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>the transition object required to continue accessing the mime type asset</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id="process_transition"><span class="type-signature"></span>process_transition<span class="signature">(transition, post_body, req)</span><span class="type-signature"> → {object}</span></h4>
<div class="description">
<p>This method generates a transition object for a kind of transition.
The transition object remains available for the duration fo the transition.
There are two types of transition processes, one, those which work with one request from the client
and two, those that work with more than one request from the client, one requiring secondary action.</p>
<p>When an application wishes to use a secondary action, it must set the <code>secondary_action</code> in the transition object.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>transition</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>post_body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line300">line 300</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>the transition object require to continue processing the transition step</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id="release_cookie"><span class="type-signature"></span>release_cookie<span class="signature">(res, cookie_id)</span><span class="type-signature"></span></h4>
<div class="description">
<p>These method allow for implementations to manage cookies when dealing with browsers</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>res</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>cookie_id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line373">line 373</a>
</li></ul></dd>
</dl>
<h4 class="name" id="session_accrue_errors"><span class="type-signature"></span>session_accrue_errors<span class="signature">(category, data, err)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Implementations of this method will keep track of errors accrued while processing a transition.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>category</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>err</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line339">line 339</a>
</li></ul></dd>
</dl>
<h4 class="name" id="set_cookie"><span class="type-signature"></span>set_cookie<span class="signature">(res, cookie_id, value, age)</span><span class="type-signature"></span></h4>
<div class="description">
<p>These method allow for implementations to manage cookies when dealing with browsers</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>res</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>cookie_id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>age</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line364">line 364</a>
</li></ul></dd>
</dl>
<h4 class="name" id="update_session_state"><span class="type-signature"></span>update_session_state<span class="signature">(transition, post_body, req)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
<p>Often called by <code>finalize_transition</code>. This is an abstract placeholder for applications that choose to implement it.
It is provided allow clients to set session variables and to figure a status to return from <code>finalize_transition</code>.</p>
<p>This method suggests a set of parameter to such an update call. But, it does not indicate a way that it should be called by
<code>finalize_transition</code>.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>transition</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>post_body</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>req</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lib_general_auth_session_lite.js.html">lib/general_auth_session_lite.js</a>, <a href="lib_general_auth_session_lite.js.html#line353">line 353</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<ul>
<li>true for successful update of the session state</li>
</ul>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="Contractual.html">Contractual</a></li><li><a href="CopiousTransitions.html">CopiousTransitions</a></li><li><a href="DefaultDB.html">DefaultDB</a></li><li><a href="base.html">base</a></li><li><a href="field_validators.html">field_validators</a></li></ul><h3>Classes</h3><ul><li><a href="Contractual.LocalTObjectCache.html">LocalTObjectCache</a></li><li><a href="Contractual.MimeHandling.html">MimeHandling</a></li><li><a href="Contractual.TransitionHandling.html">TransitionHandling</a></li><li><a href="Contractual.UserHandling.html">UserHandling</a></li><li><a href="CopiousTransitions.CopiousTransitions.html">CopiousTransitions</a></li><li><a href="DefaultDB.CustomizationMethodsByApplication.html">CustomizationMethodsByApplication</a></li><li><a href="DefaultDB.FauxInMemStore.html">FauxInMemStore</a></li><li><a href="DefaultDB.FileMapper.html">FileMapper</a></li><li><a href="DefaultDB.FilesAndRelays.html">FilesAndRelays</a></li><li><a href="DefaultDB.FilesAndRelays_base.html">FilesAndRelays_base</a></li><li><a href="DefaultDB.LocalStaticDB.html">LocalStaticDB</a></li><li><a href="DefaultDB.LocalStorageLifeCycle.html">LocalStorageLifeCycle</a></li><li><a href="DefaultDB.LocalStorageSerialization.html">LocalStorageSerialization</a></li><li><a href="DefaultDB.PageableMemStoreElement.html">PageableMemStoreElement</a></li><li><a href="DefaultDB.PersistenceContracts.html">PersistenceContracts</a></li><li><a href="DefaultDB.RemoteMessaging.html">RemoteMessaging</a></li><li><a href="DefaultDB.StaticDBDefault.html">StaticDBDefault</a></li><li><a href="GeneralUserDBWrapperImpl.html">GeneralUserDBWrapperImpl</a></li><li><a href="SessionTokenManager.html">SessionTokenManager</a></li><li><a href="base.DBClass.html">DBClass</a></li><li><a href="base.EndpointManager.html">EndpointManager</a></li><li><a href="base.GeneralAppLifeCycle.html">GeneralAppLifeCycle</a></li><li><a href="base.GeneralAuth.html">GeneralAuth</a></li><li><a href="base.GeneralBusiness.html">GeneralBusiness</a></li><li><a href="base.GeneralDynamic.html">GeneralDynamic</a></li><li><a href="base.GeneralMiddleWare.html">GeneralMiddleWare</a></li><li><a href="base.GeneralStatic.html">GeneralStatic</a></li><li><a href="base.GeneralTransitionEngImpl.html">GeneralTransitionEngImpl</a></li><li><a href="base.SessionManager.html">SessionManager</a></li><li><a href="base.SessionManager_Lite.html">SessionManager_Lite</a></li><li><a href="base.TaggedTransition.html">TaggedTransition</a></li><li><a href="base.TokenTables.html">TokenTables</a></li><li><a href="base.UserMessageEndpoint.html">UserMessageEndpoint</a></li><li><a href="base.WebSocketManager.html">WebSocketManager</a></li><li><a href="field_validators.DataLookupField.html">DataLookupField</a></li><li><a href="field_validators.EmailField.html">EmailField</a></li><li><a href="field_validators.EmailVerifyField.html">EmailVerifyField</a></li><li><a href="field_validators.FieldTest.html">FieldTest</a></li><li><a href="field_validators.FieldValidatorTools.html">FieldValidatorTools</a></li><li><a href="field_validators.ForeignAuth.html">ForeignAuth</a></li><li><a href="field_validators.GeneralValidator.html">GeneralValidator</a></li><li><a href="field_validators.LengthyAlphabetField.html">LengthyAlphabetField</a></li><li><a href="field_validators.LengthyDigitalField.html">LengthyDigitalField</a></li><li><a href="field_validators.LengthyField.html">LengthyField</a></li><li><a href="field_validators.LengthyStringField.html">LengthyStringField</a></li><li><a href="field_validators.PasswordField.html">PasswordField</a></li><li><a href="field_validators.PasswordVerifyField.html">PasswordVerifyField</a></li><li><a href="field_validators.TypeCheckField.html">TypeCheckField</a></li></ul><h3>Global</h3><ul><li><a href="global.html#generate_password_block">generate_password_block</a></li><li><a href="global.html#load_configuration">load_configuration</a></li><li><a href="global.html#load_parameters">load_parameters</a></li><li><a href="global.html#module_top">module