<spanid="vmware-vapi-vmc-package"></span><h1>vmware.vapi.vmc package<aclass="headerlink"href="#module-vmware.vapi.vmc"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
<spanid="vmware-vapi-vmc-csp-filter-module"></span><h2>vmware.vapi.vmc.csp_filter module<aclass="headerlink"href="#module-vmware.vapi.vmc.csp_filter"title="Permalink to this headline">¶</a></h2>
<p>CSP Refresh token based SecurityContextFilter</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.vmc.csp_filter.</code><codeclass="descname">CSPSecurityContextFilter</code><spanclass="sig-paren">(</span><em>session</em>, <em>refresh_token</em>, <em>refresh_url</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>session</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">requests.Session</span></code>) – Requests Session object to use for making HTTP calls</li>
<li><strong>refresh_token</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Refresh token to use for obtaining an access token</li>
<li><strong>refresh_url</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – URL that allows exchanging a refresh token for an
<codeclass="descname">get_max_retries</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.get_max_retries"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_security_context</code><spanclass="sig-paren">(</span><em>on_error</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.get_security_context"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve security context. If this method is called after an error
occured, then a new access token is obtained using the refresh token and
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>on_error</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code>) – Whether this method is called after getting an error</td>
<codeclass="descname">should_retry</code><spanclass="sig-paren">(</span><em>error_value</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter.should_retry"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether the request should be retried or not based on the error
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.