Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/ostera/fix/refresh_token'
Browse files Browse the repository at this point in the history
Conflicts:
	.gitignore
	Makefile
	files/app.config
  • Loading branch information
jtmoulia committed Apr 14, 2015
2 parents 7cb3bcb + ff56ee2 commit da52f21
Show file tree
Hide file tree
Showing 18 changed files with 432 additions and 156 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ switchboard.tar.gz
.erlang.mk.packages.v1
.erlang.mk.packages.v2
relx
switchboard.conf
switchboard.config

# Provisioning
provisioning/hosts
Expand All @@ -23,4 +23,4 @@ site/_site
.projectile

# Vagrant
.vagrant/
.vagrant/
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ ifeq ($(PROFILE), dev)
RELX_OPTS = --dev-mode
endif

DEPS = lager gproc cowboy jsx social recon
dep_social = git https://github.com/jtmoulia/social httpc
DEPS = lager gproc cowboy jsx recon
dep_recon = git https://github.com/ferd/recon 2.2.0

include erlang.mk
Expand Down
3 changes: 2 additions & 1 deletion site/doc/edoc-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%% encoding: UTF-8
{application,switchboard}.
{packages,[]}.
{modules,[imap,reloader,rfc2822,switchboard,switchboard_jmap]}.
{modules,[imap,reloader,rfc2822,switchboard,switchboard_jmap,
switchboard_oauth,switchboard_workers]}.
32 changes: 16 additions & 16 deletions site/doc/imap.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module imap</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
Expand All @@ -11,7 +11,7 @@

<h1>Module imap</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>An RFC 3501 IMAP Client.
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc.</p>
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc.</p>

<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
<p><b>Authors:</b> Thomas Moulia (<a href="mailto:[email protected]"><tt>[email protected]</tt></a>).</p>
Expand Down Expand Up @@ -43,11 +43,11 @@ <h3 class="typedecl"><a name="type-auth_plain">auth_plain()</a></h3>


<h3 class="typedecl"><a name="type-auth_xoauth2">auth_xoauth2()</a></h3>
<p><tt>auth_xoauth2() = {xoauth2, Account::binary(), AccessToken::binary() | {RefreshToken::binary(), RefreshUrl::binary()}}</tt></p>
<p><tt>auth_xoauth2() = {xoauth2, Account::binary(), AccessToken::binary() | {RefreshToken::binary(), Provider::binary()}}</tt></p>


<h3 class="typedecl"><a name="type-cmd">cmd()</a></h3>
<p><tt>cmd() = {login, <a href="#type-auth">auth()</a>} | list | {list, binary(), binary()} | {status, <a href="#type-mailbox">mailbox()</a>} | {status, <a href="#type-mailbox">mailbox()</a>, [binary()]} | {examine, <a href="#type-mailbox">mailbox()</a>} | {select, <a href="#type-mailbox">mailbox()</a>} | {search, iodata()} | {fetch, <a href="#type-seqset">seqset()</a>} | {fetch, <a href="#type-seqset">seqset()</a>, [binary()]} | {uid, {fetch, <a href="#type-seqset">seqset()</a>}} | {uid, {fetch, <a href="#type-seqset">seqset()</a>, [binary()]}} | noop | idle</tt></p>
<p><tt>cmd() = {login, <a href="#type-auth">auth()</a>} | list | {list, binary(), binary()} | {status, <a href="#type-mailbox">mailbox()</a>} | {status, <a href="#type-mailbox">mailbox()</a>, [binary()]} | {examine, <a href="#type-mailbox">mailbox()</a>} | {select, <a href="#type-mailbox">mailbox()</a>} | {delete, <a href="#type-mailbox">mailbox()</a>} | {search, iodata()} | {fetch, <a href="#type-seqset">seqset()</a>} | {fetch, <a href="#type-seqset">seqset()</a>, [binary()]} | {uid, {fetch, <a href="#type-seqset">seqset()</a>}} | {uid, {fetch, <a href="#type-seqset">seqset()</a>, [binary()]}} | noop | idle</tt></p>


<h3 class="typedecl"><a name="type-cmd_opt">cmd_opt()</a></h3>
Expand All @@ -67,7 +67,7 @@ <h3 class="typedecl"><a name="type-mailbox">mailbox()</a></h3>


<h3 class="typedecl"><a name="type-opt">opt()</a></h3>
<p><tt>opt() = {init_callback, fun(() -&gt; ok)} | {post_init_callback, fun(() -&gt; ok)} | {cmds, [{cmd, <a href="#type-cmd">cmd()</a>}]}</tt></p>
<p><tt>opt() = {init_callback, fun((term) -&gt; ok)} | {post_init_callback, fun((term) -&gt; ok)} | {cmds, [{cmd, <a href="#type-cmd">cmd()</a>}]}</tt></p>


<h3 class="typedecl"><a name="type-response">response()</a></h3>
Expand All @@ -79,8 +79,8 @@ <h3 class="typedecl"><a name="type-seqset">seqset()</a></h3>


<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#auth_to_props-1">auth_to_props/1</a></td><td>Returns the auth as a jsx:encodable proplist.</td></tr>
<tr><td valign="top"><a href="#auth_to_username-1">auth_to_username/1</a></td><td>Returns the username for the given authorization.</td></tr>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#auth_to_account-1">auth_to_account/1</a></td><td>Returns the username for the given authorization.</td></tr>
<tr><td valign="top"><a href="#auth_to_props-1">auth_to_props/1</a></td><td>Returns the auth as a jsx:encodable proplist.</td></tr>
<tr><td valign="top"><a href="#call-2">call/2</a></td><td>Equivalent to <a href="#call-3"><tt>call(Server, Cmd, [{dispatch, dispatch_to_ref(self())}])</tt></a>.
</td></tr>
<tr><td valign="top"><a href="#call-3">call/3</a></td><td>Equivalent to <a href="#call-4"><tt>call(Server, Cmd, Opts, 5000)</tt></a>.
Expand All @@ -107,17 +107,17 @@ <h2><a name="index">Function Index</a></h2>

<h2><a name="functions">Function Details</a></h2>

<h3 class="function"><a name="auth_to_account-1">auth_to_account/1</a></h3>
<div class="spec">
<p><tt>auth_to_account(X1::<a href="#type-auth">auth()</a>) -&gt; <a href="#type-account">account()</a></tt><br></p>
</div><p>Returns the username for the given authorization. This is used
to simplify process registration.</p>

<h3 class="function"><a name="auth_to_props-1">auth_to_props/1</a></h3>
<div class="spec">
<p><tt>auth_to_props(X1::<a href="#type-auth">auth()</a>) -&gt; [<a href="proplists.html#type-property">proplists:property()</a>]</tt><br></p>
</div><p>Returns the auth as a jsx:encodable proplist.</p>

<h3 class="function"><a name="auth_to_username-1">auth_to_username/1</a></h3>
<div class="spec">
<p><tt>auth_to_username(X1::<a href="#type-auth">auth()</a>) -&gt; binary()</tt><br></p>
</div><p>Returns the username for the given authorization. This is used
to simplify process registration.</p>

<h3 class="function"><a name="call-2">call/2</a></h3>
<div class="spec">
<p><tt>call(Server::pid(), Cmd::<a href="#type-cmd">cmd()</a>) -&gt; {ok, term()} | {'+', term()} | {error, term()}</tt><br></p>
Expand Down Expand Up @@ -219,12 +219,12 @@ <h3 class="function"><a name="start_link-2">start_link/2</a></h3>
<code>[{cmd, {login, ...}}, {cmd, {select, ...}}, {cmd, idle}]</code>.
</dd>

<dt><code>{init_callback, fun(() -&gt; ok)}</code></dt>
<dt><code>{init_callback, fun((State) -&gt; ok)}</code></dt>
<dd>This function will be called during the IMAP client's <code>init</code>. It is useful
for more complex registration, e.g. using <code>gproc</code>.
</dd>

<dt><code>{post_init_callback, fun(() -&gt; ok)}</code></dt>
<dt><code>{post_init_callback, fun((State) -&gt; ok)}</code></dt>
<dd>This function will be called after <code>init</code>, and after all commands
specified by the <code>cmds</code> option have successfully completed.
</dd>
Expand All @@ -237,6 +237,6 @@ <h3 class="function"><a name="stop-1">stop/1</a></h3>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Jun 8 2014, 16:20:09.</i></p>
<p><i>Generated by EDoc, Apr 7 2015, 00:17:53.</i></p>
</body>
</html>
4 changes: 3 additions & 1 deletion site/doc/modules-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ <h2 class="indextitle">Modules</h2>
<tr><td><a href="reloader.html" target="overviewFrame" class="module">reloader</a></td></tr>
<tr><td><a href="rfc2822.html" target="overviewFrame" class="module">rfc2822</a></td></tr>
<tr><td><a href="switchboard.html" target="overviewFrame" class="module">switchboard</a></td></tr>
<tr><td><a href="switchboard_jmap.html" target="overviewFrame" class="module">switchboard_jmap</a></td></tr></table>
<tr><td><a href="switchboard_jmap.html" target="overviewFrame" class="module">switchboard_jmap</a></td></tr>
<tr><td><a href="switchboard_oauth.html" target="overviewFrame" class="module">switchboard_oauth</a></td></tr>
<tr><td><a href="switchboard_workers.html" target="overviewFrame" class="module">switchboard_workers</a></td></tr></table>
</body>
</html>
6 changes: 3 additions & 3 deletions site/doc/overview-summary.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Switchboard
</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
Expand All @@ -10,7 +10,7 @@
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<h1>Switchboard
</h1>
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc.</p>
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc.</p>
<p><b>Authors:</b> Thomas Moulia (<a href="mailto:[email protected]"><tt>[email protected]</tt></a>).</p>
<p>Switchboard is a <a target="_parent" href="http://spatch.co/">Spatch</a> product.</p>

Expand Down Expand Up @@ -113,6 +113,6 @@ <h4>Finding and Running Tests</h4>
is reloaded (credit for <code>reloader.erl</code> goes to <code>mochi/mochiweb</code>).
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Jun 8 2014, 21:24:14.</i></p>
<p><i>Generated by EDoc, Apr 7 2015, 00:17:53.</i></p>
</body>
</html>
6 changes: 3 additions & 3 deletions site/doc/reloader.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module reloader</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
Expand All @@ -12,7 +12,7 @@
<h1>Module reloader</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Erlang module for automatically reloading modified modules
during development.
<p>Copyright © 2007 Mochi Media, Inc.</p>
<p>Copyright © 2007 Mochi Media, Inc.</p>

<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
<p><b>Authors:</b> Matthew Dempsky (<a href="mailto:[email protected]"><tt>[email protected]</tt></a>).</p>
Expand Down Expand Up @@ -102,6 +102,6 @@ <h3 class="function"><a name="terminate-2">terminate/2</a></h3>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Jun 8 2014, 16:20:09.</i></p>
<p><i>Generated by EDoc, Apr 7 2015, 00:17:53.</i></p>
</body>
</html>
6 changes: 3 additions & 3 deletions site/doc/rfc2822.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module rfc2822</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
Expand All @@ -11,7 +11,7 @@

<h1>Module rfc2822</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>rfc2822.
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc</p>
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc</p>

<p><b>Authors:</b> Thomas Moulia (<a href="mailto:[email protected]"><tt>[email protected]</tt></a>).</p>

Expand All @@ -29,6 +29,6 @@ <h3 class="function"><a name="decode-1">decode/1</a></h3>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Jun 8 2014, 16:20:09.</i></p>
<p><i>Generated by EDoc, Apr 7 2015, 00:17:53.</i></p>
</body>
</html>
6 changes: 3 additions & 3 deletions site/doc/switchboard.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module switchboard</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
Expand All @@ -11,7 +11,7 @@

<h1>Module switchboard</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>This module provides the main interface to Switchboard.
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc.</p>
<p>Copyright © Copyright (c) 2014, ThusFresh, Inc.</p>

<p><b>Authors:</b> Thomas Moulia (<a href="mailto:[email protected]"><tt>[email protected]</tt></a>).</p>

Expand Down Expand Up @@ -207,6 +207,6 @@ <h3 class="function"><a name="with_imap-2">with_imap/2</a></h3>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Jun 8 2014, 16:20:09.</i></p>
<p><i>Generated by EDoc, Apr 7 2015, 00:17:53.</i></p>
</body>
</html>
Loading

0 comments on commit da52f21

Please sign in to comment.