Skip to content

Commit

Permalink
chore(*): release 4.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bungle committed Aug 16, 2023
1 parent f4980f0 commit 5f2aed6
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 126 deletions.
6 changes: 6 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to `lua-resty-session` will be documented in this file.


## [4.0.5] - 2023-08-16
### Fixed
- fix(dshm/memcached): add a missing return parameter as otherwise pool parameters are not respected, fix #171


## [4.0.4] - 2023-06-05
### Changed
- chore(utils): remove dependency for lua_pack, fix #158
Expand Down
5 changes: 3 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h1>resty.session</h1>




<h2>Modules</h2>
<ul class="nowrap">
<li><a href="modules/resty.session.html">resty.session</a></li>
Expand Down Expand Up @@ -119,8 +120,8 @@ <h2>Modules</h2>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
1 change: 1 addition & 0 deletions docs/ldoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ pre .library { color: #0e7c6b; }
pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
pre .string { color: #8080ff; }
pre .number { color: #f8660d; }
pre .function-name { color: #60447f; }
pre .operator { color: #2239a8; font-weight: bold; }
pre .preprocessor, pre .prepro { color: #a33243; }
pre .global { color: #800080; }
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/resty.session.dshm.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -389,8 +390,8 @@ <h3>Returns:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/resty.session.file.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -359,8 +360,8 @@ <h3>Returns:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/resty.session.file.thread.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -323,8 +324,8 @@ <h3>Returns:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/resty.session.file.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -342,8 +343,8 @@ <h3>Returns:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
61 changes: 31 additions & 30 deletions docs/modules/resty.session.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -315,12 +316,12 @@ <h3>Parameters:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.open()
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>()
<span class="keyword">if</span> <span class="keyword">not</span> exists <span class="keyword">then</span>
session:set_data({
session:<span class="function-name">set_data</span>({
cart = {},
})
session:save()
session:<span class="function-name">save</span>()
<span class="keyword">end</span></pre>
</ul>

Expand All @@ -345,10 +346,10 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.open()
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>()
<span class="keyword">if</span> exists <span class="keyword">then</span>
<span class="keyword">local</span> data = session:get_data()
ngx.req.set_header(<span class="string">"Authorization"</span>, <span class="string">"Bearer "</span> .. data.access_token)
<span class="keyword">local</span> data = session:<span class="function-name">get_data</span>()
ngx.req.<span class="function-name">set_header</span>(<span class="string">"Authorization"</span>, <span class="string">"Bearer "</span> .. data.access_token)
<span class="keyword">end</span></pre>
</ul>

Expand Down Expand Up @@ -409,10 +410,10 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.open()
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>()
<span class="keyword">if</span> exists <span class="keyword">then</span>
<span class="keyword">local</span> access_token = session:get(<span class="string">"access-token"</span>)
ngx.req.set_header(<span class="string">"Authorization"</span>, <span class="string">"Bearer "</span> .. access_token)
<span class="keyword">local</span> access_token = session:<span class="function-name">get</span>(<span class="string">"access-token"</span>)
ngx.req.<span class="function-name">set_header</span>(<span class="string">"Authorization"</span>, <span class="string">"Bearer "</span> .. access_token)
<span class="keyword">end</span></pre>
</ul>

Expand All @@ -438,8 +439,8 @@ <h3>Parameters:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.new()
session.set_audience(<span class="string">"my-service"</span>)</pre>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">new</span>()
session.<span class="function-name">set_audience</span>(<span class="string">"my-service"</span>)</pre>
</ul>

</dd>
Expand Down Expand Up @@ -484,8 +485,8 @@ <h3>Parameters:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.new()
session.set_subject(<span class="string">"[email protected]"</span>)</pre>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">new</span>()
session.<span class="function-name">set_subject</span>(<span class="string">"[email protected]"</span>)</pre>
</ul>

</dd>
Expand All @@ -509,9 +510,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.open()
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>()
<span class="keyword">if</span> exists <span class="keyword">then</span>
<span class="keyword">local</span> subject = session.get_subject()
<span class="keyword">local</span> subject = session.<span class="function-name">get_subject</span>()
<span class="keyword">end</span></pre>
</ul>

Expand Down Expand Up @@ -546,9 +547,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.open()
<pre class="example"><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>()
<span class="keyword">if</span> exists <span class="keyword">then</span>
<span class="keyword">local</span> timeout = session.get_property(<span class="string">"timeout"</span>)
<span class="keyword">local</span> timeout = session.<span class="function-name">get_property</span>(<span class="string">"timeout"</span>)
<span class="keyword">end</span></pre>
</ul>

Expand Down Expand Up @@ -1037,7 +1038,7 @@ <h3>Parameters:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="global">require</span> <span class="string">"resty.session"</span>.init({
<pre class="example"><span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">init</span>({
audience = <span class="string">"my-application"</span>,
storage = <span class="string">"redis"</span>,
redis = {
Expand Down Expand Up @@ -1082,9 +1083,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.new()
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">new</span>()
<span class="comment">-- OR
</span><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.new({
</span><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">new</span>({
audience = <span class="string">"my-application"</span>,
})</pre>
</ul>
Expand Down Expand Up @@ -1131,9 +1132,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.open()
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>()
<span class="comment">-- OR
</span><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.open({
</span><span class="keyword">local</span> session, err, exists = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">open</span>({
audience = <span class="string">"my-application"</span>,
})</pre>
</ul>
Expand Down Expand Up @@ -1180,9 +1181,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.start()
<pre class="example"><span class="keyword">local</span> session = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">start</span>()
<span class="comment">-- OR
</span><span class="keyword">local</span> session, err, exists, refreshed = <span class="global">require</span> <span class="string">"resty.session"</span>.start({
</span><span class="keyword">local</span> session, err, exists, refreshed = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">start</span>({
audience = <span class="string">"my-application"</span>,
})</pre>
</ul>
Expand Down Expand Up @@ -1238,9 +1239,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="global">require</span> <span class="string">"resty.session"</span>.logout()
<pre class="example"><span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">logout</span>()
<span class="comment">-- OR
</span><span class="keyword">local</span> ok, err, exists, logged_out = <span class="global">require</span> <span class="string">"resty.session"</span>.logout({
</span><span class="keyword">local</span> ok, err, exists, logged_out = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">logout</span>({
audience = <span class="string">"my-application"</span>,
})</pre>
</ul>
Expand Down Expand Up @@ -1285,9 +1286,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example"><span class="global">require</span> <span class="string">"resty.session"</span>.destroy()
<pre class="example"><span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">destroy</span>()
<span class="comment">-- OR
</span><span class="keyword">local</span> ok, err, exists, destroyed = <span class="global">require</span> <span class="string">"resty.session"</span>.destroy({
</span><span class="keyword">local</span> ok, err, exists, destroyed = <span class="global">require</span> <span class="string">"resty.session"</span>.<span class="function-name">destroy</span>({
cookie_name = <span class="string">"auth"</span>,
})</pre>
</ul>
Expand All @@ -1299,8 +1300,8 @@ <h3>Usage:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
5 changes: 3 additions & 2 deletions docs/modules/resty.session.memcached.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -392,8 +393,8 @@ <h3>Returns:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
25 changes: 13 additions & 12 deletions docs/modules/resty.session.mysql.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<br/>
<h1>resty.session</h1>


<ul>
<li><a href="../index.html">Index</a></li>
</ul>
Expand Down Expand Up @@ -430,12 +431,12 @@ <h2 class="section-header "><a name="Database"></a>Database </h2>

<h3>Usage:</h3>
<ul>
<pre class="example">CREATE TABLE IF NOT EXISTS sessions (
sid CHAR(<span class="number">43</span>) PRIMARY KEY,
name VARCHAR(<span class="number">255</span>),
<pre class="example">CREATE TABLE IF NOT EXISTS <span class="function-name">sessions</span> (
sid <span class="function-name">CHAR</span>(<span class="number">43</span>) PRIMARY KEY,
name <span class="function-name">VARCHAR</span>(<span class="number">255</span>),
data MEDIUMTEXT,
exp DATETIME,
INDEX (exp)
<span class="function-name">INDEX</span> (exp)
) CHARACTER SET ascii;</pre>
</ul>

Expand All @@ -456,12 +457,12 @@ <h3>Usage:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example">CREATE TABLE IF NOT EXISTS sessions_meta (
aud VARCHAR(<span class="number">255</span>),
sub VARCHAR(<span class="number">255</span>),
sid CHAR(<span class="number">43</span>),
PRIMARY KEY (aud, sub, sid),
CONSTRAINT FOREIGN KEY (sid) REFERENCES sessions(sid) ON DELETE CASCADE ON UPDATE CASCADE
<pre class="example">CREATE TABLE IF NOT EXISTS <span class="function-name">sessions_meta</span> (
aud <span class="function-name">VARCHAR</span>(<span class="number">255</span>),
sub <span class="function-name">VARCHAR</span>(<span class="number">255</span>),
sid <span class="function-name">CHAR</span>(<span class="number">43</span>),
PRIMARY <span class="function-name">KEY</span> (aud, sub, sid),
CONSTRAINT FOREIGN <span class="function-name">KEY</span> (sid) REFERENCES <span class="function-name">sessions</span>(sid) ON DELETE CASCADE ON UPDATE CASCADE
) CHARACTER SET ascii;</pre>
</ul>

Expand All @@ -472,8 +473,8 @@ <h3>Usage:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2023-06-05 17:05:22 </i>
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-08-16 18:11:28 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
Loading

0 comments on commit 5f2aed6

Please sign in to comment.