You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="sig-name descname"><spanclass="pre">update_session_auth_header</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">access_token</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="reference internal" href="../_modules/O365/connection.html#Connection.update_session_auth_header"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#O365.connection.Connection.update_session_auth_header" title="Link to this definition"></a></dt>
514
+
<dd><p>Will update the internal request session auth header with an access token</p>
<spanclass="sig-name descname"><spanclass="pre">auth</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">Tuple</span></em><aclass="headerlink" href="#O365.connection.Connection.auth" title="Link to this definition"></a></dt>
<spanclass="sig-name descname"><spanclass="pre">should_refresh_token</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">con</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></span><aclass="reference internal" href="../../_modules/O365/utils/token.html#BaseTokenBackend.should_refresh_token"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#O365.utils.token.BaseTokenBackend.should_refresh_token" title="Link to this definition"></a></dt>
353
+
<spanclass="sig-name descname"><spanclass="pre">should_refresh_token</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">con</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><aclass="reference internal" href="../connection.html#O365.connection.Connection" title="O365.connection.Connection"><spanclass="pre">Connection</span></a><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="keyword-only-separator o"><abbrtitle="Keyword-only parameters separator (PEP 3102)"><spanclass="pre">*</span></abbr></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">username</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">bool</span><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></span><aclass="reference internal" href="../../_modules/O365/utils/token.html#BaseTokenBackend.should_refresh_token"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink" href="#O365.utils.token.BaseTokenBackend.should_refresh_token" title="Link to this definition"></a></dt>
354
354
<dd><p>This method is intended to be implemented for environments
355
355
where multiple Connection instances are running on parallel.</p>
356
356
<p>This method should check if it’s time to refresh the token or not.
@@ -379,27 +379,27 @@ <h1>Token<a class="headerlink" href="#token" title="Link to this heading"></a
379
379
</div>
380
380
<divclass="line-block">
381
381
<divclass="line">If this returns True, then the Connection will refresh the token.</div>
382
-
<divclass="line">If this returns False, then the Connection will NOT refresh the token.</div>
383
-
<divclass="line">If this returns None, then this method already executed the refresh and therefore
384
-
the Connection does not have to.</div>
382
+
<divclass="line">If this returns False, then the Connection will NOT refresh the token as it was refreshed by
383
+
another instance or thread.</div>
384
+
<divclass="line">If this returns None, then this method has already executed the refresh and also updated the access
385
+
token into the connection session and therefore the Connection does not have to.</div>
385
386
</div>
386
387
<p>By default, this always returns True</p>
387
388
</div></blockquote>
388
389
<p>There is an example of this in the example’s folder.</p>
<ddclass="field-odd"><p><strong>con</strong> (<aclass="reference internal" href="../connection.html#O365.connection.Connection" title="O365.connection.Connection"><em>Connection</em></a>) – the connection that calls this method. This
392
-
is passed because maybe the locking mechanism needs to refresh the token within the lock applied in this method.</p>
<spanclass="sig-name descname"><spanclass="pre">__init__</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#O365.utils.token.CryptographyManagerType.__init__" title="Link to this definition"></a></dt>
@@ -742,7 +742,7 @@ <h1>Token<a class="headerlink" href="#token" title="Link to this heading"></a
<spanclass="sig-name descname"><spanclass="pre">collection</span></span><aclass="headerlink" href="#O365.utils.token.FirestoreBackend.collection" title="Link to this definition"></a></dt>
0 commit comments