doc/Trello/Authorization/OAuthPolicy.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Class: Trello::Authorization::OAuthPolicy
— Documentation by YARD 0.9.25
</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "Trello::Authorization::OAuthPolicy";
relpath = '../../';
</script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../../_index.html">Index (O)</a> »
<span class='title'><span class='object_link'><a href="../../Trello.html" title="Trello (module)">Trello</a></span></span> » <span class='title'><span class='object_link'><a href="../Authorization.html" title="Trello::Authorization (module)">Authorization</a></span></span>
»
<span class="title">OAuthPolicy</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../../class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Class: Trello::Authorization::OAuthPolicy
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">Trello::Authorization::OAuthPolicy</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/trello/authorization.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>Handles the OAuth connectivity to Trello.</p>
<p>For 2-legged OAuth, do the following:</p>
<pre class="code ruby"><code class="ruby"><span class='const'>OAuthPolicy</span><span class='period'>.</span><span class='id identifier rubyid_consumer_credential'><span class='object_link'><a href="#consumer_credential-class_method" title="Trello::Authorization::OAuthPolicy.consumer_credential (method)">consumer_credential</a></span></span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="OAuthCredential.html" title="Trello::Authorization::OAuthCredential (class)">OAuthCredential</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>public_key</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>secret</span><span class='tstring_end'>"</span></span>
<span class='const'>OAuthPolicy</span><span class='period'>.</span><span class='id identifier rubyid_token'><span class='object_link'><a href="#token-class_method" title="Trello::Authorization::OAuthPolicy.token (method)">token</a></span></span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="OAuthCredential.html" title="Trello::Authorization::OAuthCredential (class)">OAuthCredential</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>token_key</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>nil</span>
</code></pre>
<p>For 3-legged OAuth, do the following:</p>
<pre class="code ruby"><code class="ruby"><span class='const'>OAuthPolicy</span><span class='period'>.</span><span class='id identifier rubyid_consumer_credential'><span class='object_link'><a href="#consumer_credential-class_method" title="Trello::Authorization::OAuthPolicy.consumer_credential (method)">consumer_credential</a></span></span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="OAuthCredential.html" title="Trello::Authorization::OAuthCredential (class)">OAuthCredential</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>public_key</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>secret</span><span class='tstring_end'>"</span></span>
<span class='const'>OAuthPolicy</span><span class='period'>.</span><span class='id identifier rubyid_return_url'><span class='object_link'><a href="#return_url-class_method" title="Trello::Authorization::OAuthPolicy.return_url (method)">return_url</a></span></span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http://your.site.com/path/to/receive/post</span><span class='tstring_end'>"</span></span>
<span class='const'>OAuthPolicy</span><span class='period'>.</span><span class='id identifier rubyid_callback'><span class='object_link'><a href="#callback-class_method" title="Trello::Authorization::OAuthPolicy.callback (method)">callback</a></span></span> <span class='op'>=</span> <span class='const'>Proc</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_request_token'>request_token</span><span class='op'>|</span>
<span class='const'>DB</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span><span class='lparen'>(</span><span class='id identifier rubyid_request_token'>request_token</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_request_token'>request_token</span><span class='period'>.</span><span class='id identifier rubyid_secret'>secret</span><span class='rparen'>)</span>
<span class='id identifier rubyid_redirect_to'>redirect_to</span> <span class='id identifier rubyid_request_token'>request_token</span><span class='period'>.</span><span class='id identifier rubyid_authorize_url'>authorize_url</span>
<span class='kw'>end</span>
</code></pre>
<p>Then, recreate the request token given the request token key and secret you saved earlier, and the consumer, and pass that RequestToken instance the #get_access_token method, and store that in OAuthPolicy.token as a OAuthCredential.</p>
</div>
</div>
<div class="tags">
</div>
<h2>Class Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#callback-class_method" title="callback (class method)">.<strong>callback</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute callback.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#consumer_credential-class_method" title="consumer_credential (class method)">.<strong>consumer_credential</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute consumer_credential.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#return_url-class_method" title="return_url (class method)">.<strong>return_url</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute return_url.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#token-class_method" title="token (class method)">.<strong>token</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute token.</p>
</div></span>
</li>
</ul>
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#attributes-instance_method" title="#attributes (instance method)">#<strong>attributes</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute attributes.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#callback-instance_method" title="#callback (instance method)">#<strong>callback</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute callback.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#consumer_credential-instance_method" title="#consumer_credential (instance method)">#<strong>consumer_credential</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute consumer_credential.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#return_url-instance_method" title="#return_url (instance method)">#<strong>return_url</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute return_url.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#token-instance_method" title="#token (instance method)">#<strong>token</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute token.</p>
</div></span>
</li>
</ul>
<h2>
Class Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#authorize-class_method" title="authorize (class method)">.<strong>authorize</strong>(request) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#authorize-instance_method" title="#authorize (instance method)">#<strong>authorize</strong>(request) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#consumer_key-instance_method" title="#consumer_key (instance method)">#<strong>consumer_key</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#consumer_secret-instance_method" title="#consumer_secret (instance method)">#<strong>consumer_secret</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(attrs = {}) ⇒ OAuthPolicy </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of OAuthPolicy.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#oauth_token-instance_method" title="#oauth_token (instance method)">#<strong>oauth_token</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#oauth_token_secret-instance_method" title="#oauth_token_secret (instance method)">#<strong>oauth_token_secret</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong>(attrs = {}) ⇒ <tt><span class='object_link'><a href="" title="Trello::Authorization::OAuthPolicy (class)">OAuthPolicy</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of OAuthPolicy.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
84
85
86
87
88
89
90
91</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 84</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='ivar'>@consumer_key</span> <span class='op'>=</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='symbol'>:consumer_key</span><span class='rbracket'>]</span>
<span class='ivar'>@consumer_secret</span> <span class='op'>=</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='symbol'>:consumer_secret</span><span class='rbracket'>]</span>
<span class='ivar'>@oauth_token</span> <span class='op'>=</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='symbol'>:oauth_token</span><span class='rbracket'>]</span>
<span class='ivar'>@oauth_token_secret</span> <span class='op'>=</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='symbol'>:oauth_token_secret</span><span class='rbracket'>]</span>
<span class='ivar'>@return_url</span> <span class='op'>=</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='symbol'>:return_url</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_return_url'>return_url</span>
<span class='ivar'>@callback</span> <span class='op'>=</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='lbracket'>[</span><span class='symbol'>:callback</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_callback'>callback</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="class_attr_details" class="attr_details">
<h2>Class Attribute Details</h2>
<span id="callback=-class_method"></span>
<div class="method_details first">
<h3 class="signature first" id="callback-class_method">
.<strong>callback</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute callback.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
74
75
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 74</span>
<span class='kw'>def</span> <span class='id identifier rubyid_callback'>callback</span>
<span class='ivar'>@callback</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="consumer_credential=-class_method"></span>
<div class="method_details ">
<h3 class="signature " id="consumer_credential-class_method">
.<strong>consumer_credential</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute consumer_credential.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
74
75
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 74</span>
<span class='kw'>def</span> <span class='id identifier rubyid_consumer_credential'>consumer_credential</span>
<span class='ivar'>@consumer_credential</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="return_url=-class_method"></span>
<div class="method_details ">
<h3 class="signature " id="return_url-class_method">
.<strong>return_url</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute return_url.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
74
75
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 74</span>
<span class='kw'>def</span> <span class='id identifier rubyid_return_url'>return_url</span>
<span class='ivar'>@return_url</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="token=-class_method"></span>
<div class="method_details ">
<h3 class="signature " id="token-class_method">
.<strong>token</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute token.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
74
75
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 74</span>
<span class='kw'>def</span> <span class='id identifier rubyid_token'>token</span>
<span class='ivar'>@token</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="attributes=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="attributes-instance_method">
#<strong>attributes</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute attributes.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
81
82
83</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 81</span>
<span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
<span class='ivar'>@attributes</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="callback=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="callback-instance_method">
#<strong>callback</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute callback.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
82
83
84</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_callback'>callback</span>
<span class='ivar'>@callback</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="consumer_credential=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="consumer_credential-instance_method">
#<strong>consumer_credential</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute consumer_credential.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
82
83
84</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_consumer_credential'>consumer_credential</span>
<span class='ivar'>@consumer_credential</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="return_url=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="return_url-instance_method">
#<strong>return_url</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute return_url.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
82
83
84</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_return_url'>return_url</span>
<span class='ivar'>@return_url</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="token=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="token-instance_method">
#<strong>token</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute token.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
82
83
84</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_token'>token</span>
<span class='ivar'>@token</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="authorize-class_method">
.<strong>authorize</strong>(request) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
76
77
78</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 76</span>
<span class='kw'>def</span> <span class='id identifier rubyid_authorize'>authorize</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
<span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_authorize'>authorize</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="authorize-instance_method">
#<strong>authorize</strong>(request) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 93</span>
<span class='kw'>def</span> <span class='id identifier rubyid_authorize'>authorize</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_consumer_credential'>consumer_credential</span>
<span class='const'><span class='object_link'><a href="../../Trello.html" title="Trello (module)">Trello</a></span></span><span class='period'>.</span><span class='id identifier rubyid_logger'><span class='object_link'><a href="../../Trello.html#logger-class_method" title="Trello.logger (method)">logger</a></span></span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The consumer_credential has not been supplied.</span><span class='tstring_end'>"</span></span>
<span class='id identifier rubyid_fail'>fail</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The consumer_credential has not been supplied.</span><span class='tstring_end'>"</span></span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_token'>token</span>
<span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Authorization</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_get_auth_header'>get_auth_header</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_uri'>uri</span><span class='comma'>,</span> <span class='symbol'>:get</span><span class='rparen'>)</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_request'>request</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_consumer'>consumer</span><span class='lparen'>(</span><span class='label'>return_url:</span> <span class='id identifier rubyid_return_url'>return_url</span><span class='comma'>,</span> <span class='label'>callback_method:</span> <span class='symbol'>:postMessage</span><span class='rparen'>)</span>
<span class='id identifier rubyid_request_token'>request_token</span> <span class='op'>=</span> <span class='id identifier rubyid_consumer'>consumer</span><span class='period'>.</span><span class='id identifier rubyid_get_request_token'>get_request_token</span><span class='lparen'>(</span><span class='label'>oauth_callback:</span> <span class='id identifier rubyid_return_url'>return_url</span><span class='rparen'>)</span>
<span class='id identifier rubyid_callback'>callback</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='id identifier rubyid_request_token'>request_token</span>
<span class='kw'>return</span> <span class='kw'>nil</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="consumer_key-instance_method">
#<strong>consumer_key</strong> ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
118
119
120</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 118</span>
<span class='kw'>def</span> <span class='id identifier rubyid_consumer_key'>consumer_key</span>
<span class='id identifier rubyid_consumer_credential'>consumer_credential</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="consumer_secret-instance_method">
#<strong>consumer_secret</strong> ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
122
123
124</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 122</span>
<span class='kw'>def</span> <span class='id identifier rubyid_consumer_secret'>consumer_secret</span>
<span class='id identifier rubyid_consumer_credential'>consumer_credential</span><span class='period'>.</span><span class='id identifier rubyid_secret'>secret</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="oauth_token-instance_method">
#<strong>oauth_token</strong> ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
126
127
128</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 126</span>
<span class='kw'>def</span> <span class='id identifier rubyid_oauth_token'>oauth_token</span>
<span class='id identifier rubyid_token'>token</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="oauth_token_secret-instance_method">
#<strong>oauth_token_secret</strong> ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
130
131
132</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/trello/authorization.rb', line 130</span>
<span class='kw'>def</span> <span class='id identifier rubyid_oauth_token_secret'>oauth_token_secret</span>
<span class='id identifier rubyid_token'>token</span><span class='period'>.</span><span class='id identifier rubyid_secret'>secret</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Tue Nov 10 16:31:59 2020 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.6).
</div>
</div>
</body>
</html>