<spanid="vmware-vapi-security-client-package"></span><h1>vmware.vapi.security.client package<aclass="headerlink"href="#module-vmware.vapi.security.client"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-security-client-security-context-filter-module"></span><h2>vmware.vapi.security.client.security_context_filter module<aclass="headerlink"href="#module-vmware.vapi.security.client.security_context_filter"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.security.client.security_context_filter.</span></code><codeclass="sig-name descname"><spanclass="pre">LegacySecurityContextFilter</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">next_provider</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">security_context</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.LegacySecurityContextFilter"title="Permalink to this definition">¶</a></dt>
<p>SecurityContextFilter in API Provider chain adds the security
context to the execution context passed in.</p>
<p>Initialize SecurityContextFilter</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>next_provider</strong> (<aclass="reference internal"href="vmware.vapi.html#vmware.vapi.core.ApiProvider"title="vmware.vapi.core.ApiProvider"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.core.ApiProvider</span></code></a>) – API Provider to invoke the requests</p></li>
<codeclass="sig-name descname"><spanclass="pre">get_max_retries</span></code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.LegacySecurityContextFilter.get_max_retries"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">get_security_context</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">on_error</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.LegacySecurityContextFilter.get_security_context"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the stored security context.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><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</p>
<codeclass="sig-name descname"><spanclass="pre">set_security_context</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">security_context</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.LegacySecurityContextFilter.set_security_context"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">should_retry</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">error_value</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.LegacySecurityContextFilter.should_retry"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether the request should be retried or not based on the error.</p>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.security.client.security_context_filter.</span></code><codeclass="sig-name descname"><spanclass="pre">SecurityContextFilter</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">next_provider</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.SecurityContextFilter"title="Permalink to this definition">¶</a></dt>
<p>SecurityContextFilter in API Provider chain adds the security
context to the execution context passed in.</p>
<p>Initialize SecurityContextFilter</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>next_provider</strong> (<aclass="reference internal"href="vmware.vapi.html#vmware.vapi.core.ApiProvider"title="vmware.vapi.core.ApiProvider"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.core.ApiProvider</span></code></a>) – API Provider to invoke the requests</p>
<emclass="property"><spanclass="pre">abstract</span></em><codeclass="sig-name descname"><spanclass="pre">get_max_retries</span></code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.SecurityContextFilter.get_max_retries"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">abstract</span></em><codeclass="sig-name descname"><spanclass="pre">get_security_context</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">on_error</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.SecurityContextFilter.get_security_context"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve security context. If this method is called after an error
occured and the request needs to be retried, then a new security context
may be created depending on the scheme.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><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</p>
<codeclass="sig-name descname"><spanclass="pre">invoke</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">service_id</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">operation_id</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">input_value</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">ctx</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.SecurityContextFilter.invoke"title="Permalink to this definition">¶</a></dt>
<dd><p>Invoke an API request</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>service_id</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Service identifier</p></li>
<emclass="property"><spanclass="pre">abstract</span></em><codeclass="sig-name descname"><spanclass="pre">should_retry</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">error_value</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.security.client.security_context_filter.SecurityContextFilter.should_retry"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether the request should be retried or not based on the error.</p>