Skip to content

Commit

Permalink
Merge pull request #594 from Yubico/ykman-5.5.0-docs
Browse files Browse the repository at this point in the history
Update ykman docs
  • Loading branch information
dainnilsson authored Jun 26, 2024
2 parents ac8f977 + 6c758d5 commit ed85046
Show file tree
Hide file tree
Showing 51 changed files with 11,098 additions and 4,928 deletions.
2 changes: 1 addition & 1 deletion static/yubikey-manager/API_Documentation/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 4924bcae82217482b812825346ce3423
config: c45be3442e54ed790e6ba723d3ed956c
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>collections &mdash; yubikey-manager 5.4.0 documentation</title>
<title>collections &mdash; yubikey-manager 5.5.0 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
Expand All @@ -13,9 +13,9 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=f02a3fcf"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/documentation_options.js?v=a385a3de"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand All @@ -33,7 +33,7 @@
yubikey-manager
</a>
<div class="version">
5.4
5.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand Down Expand Up @@ -713,7 +713,8 @@ <h1>Source code for collections</h1><div class="highlight"><pre>
<span class="sd"> &gt;&gt;&gt; sorted(c.elements())</span>
<span class="sd"> [&#39;A&#39;, &#39;A&#39;, &#39;B&#39;, &#39;B&#39;, &#39;C&#39;, &#39;C&#39;]</span>

<span class="sd"> # Knuth&#39;s example for prime factors of 1836: 2**2 * 3**3 * 17**1</span>
<span class="sd"> Knuth&#39;s example for prime factors of 1836: 2**2 * 3**3 * 17**1</span>

<span class="sd"> &gt;&gt;&gt; import math</span>
<span class="sd"> &gt;&gt;&gt; prime_factors = Counter({2: 2, 3: 3, 17: 1})</span>
<span class="sd"> &gt;&gt;&gt; math.prod(prime_factors.elements())</span>
Expand Down Expand Up @@ -754,7 +755,7 @@ <h1>Source code for collections</h1><div class="highlight"><pre>

<span class="sd"> &#39;&#39;&#39;</span>
<span class="c1"># The regular dict.update() operation makes no sense here because the</span>
<span class="c1"># replace behavior results in the some of original untouched counts</span>
<span class="c1"># replace behavior results in some of the original untouched counts</span>
<span class="c1"># being mixed-in with all of the other counts for a mismash that</span>
<span class="c1"># doesn&#39;t have a straight-forward interpretation in most counting</span>
<span class="c1"># contexts. Instead, we implement straight-addition. Both the inputs</span>
Expand Down
23 changes: 16 additions & 7 deletions static/yubikey-manager/API_Documentation/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; yubikey-manager 5.4.0 documentation</title>
<title>Overview: module code &mdash; yubikey-manager 5.5.0 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
Expand All @@ -13,9 +13,9 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=f02a3fcf"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/documentation_options.js?v=a385a3de"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand All @@ -33,7 +33,7 @@
yubikey-manager
</a>
<div class="version">
5.4
5.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand Down Expand Up @@ -72,24 +72,33 @@
<div itemprop="articleBody">

<h1>All modules for which code is available</h1>
<ul><li><a href="collections.html">collections</a></li>
<ul><li><a href="_ctypes.html">_ctypes</a></li>
<li><a href="collections.html">collections</a></li>
<li><a href="ykman/base.html">ykman.base</a></li>
<li><a href="ykman/device.html">ykman.device</a></li>
<li><a href="ykman/diagnostics.html">ykman.diagnostics</a></li>
<li><a href="ykman/fido.html">ykman.fido</a></li>
<li><a href="ykman/hsmauth.html">ykman.hsmauth</a></li>
<li><a href="ykman/logging.html">ykman.logging</a></li>
<li><a href="ykman/logging_setup.html">ykman.logging_setup</a></li>
<li><a href="ykman/oath.html">ykman.oath</a></li>
<li><a href="ykman/openpgp.html">ykman.openpgp</a></li>
<li><a href="ykman/otp.html">ykman.otp</a></li>
<li><a href="ykman/piv.html">ykman.piv</a></li>
<li><a href="ykman/scripting.html">ykman.scripting</a></li>
<li><a href="ykman/settings.html">ykman.settings</a></li>
<li><a href="ykman/util.html">ykman.util</a></li>
<li><a href="yubikit/core.html">yubikit.core</a></li>
<ul><li><a href="yubikit/core/otp.html">yubikit.core.otp</a></li>
<li><a href="yubikit/core/smartcard.html">yubikit.core.smartcard</a></li>
</ul><li><a href="yubikit/hsmauth.html">yubikit.hsmauth</a></li>
<ul><li><a href="yubikit/core/smartcard/scp.html">yubikit.core.smartcard.scp</a></li>
</ul></ul><li><a href="yubikit/hsmauth.html">yubikit.hsmauth</a></li>
<li><a href="yubikit/logging.html">yubikit.logging</a></li>
<li><a href="yubikit/management.html">yubikit.management</a></li>
<li><a href="yubikit/oath.html">yubikit.oath</a></li>
<li><a href="yubikit/openpgp.html">yubikit.openpgp</a></li>
<li><a href="yubikit/piv.html">yubikit.piv</a></li>
<li><a href="yubikit/securitydomain.html">yubikit.securitydomain</a></li>
<li><a href="yubikit/support.html">yubikit.support</a></li>
<li><a href="yubikit/yubiotp.html">yubikit.yubiotp</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ykman.base &mdash; yubikey-manager 5.4.0 documentation</title>
<title>ykman.base &mdash; yubikey-manager 5.5.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
Expand All @@ -13,9 +13,9 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=f02a3fcf"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/documentation_options.js?v=a385a3de"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
Expand All @@ -33,7 +33,7 @@
yubikey-manager
</a>
<div class="version">
5.4
5.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -104,7 +104,9 @@ <h1>Source code for ykman.base</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Hashable</span>


<div class="viewcode-block" id="YkmanDevice"><a class="viewcode-back" href="../../rst/ykman.html#ykman.base.YkmanDevice">[docs]</a><span class="k">class</span> <span class="nc">YkmanDevice</span><span class="p">(</span><span class="n">YubiKeyDevice</span><span class="p">):</span>
<div class="viewcode-block" id="YkmanDevice">
<a class="viewcode-back" href="../../rst/ykman.html#ykman.base.YkmanDevice">[docs]</a>
<span class="k">class</span> <span class="nc">YkmanDevice</span><span class="p">(</span><span class="n">YubiKeyDevice</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;YubiKey device reference, with optional PID&quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">transport</span><span class="p">:</span> <span class="n">TRANSPORT</span><span class="p">,</span> <span class="n">fingerprint</span><span class="p">:</span> <span class="n">Hashable</span><span class="p">,</span> <span class="n">pid</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">PID</span><span class="p">]):</span>
Expand All @@ -122,6 +124,7 @@ <h1>Source code for ykman.base</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">pid</span> <span class="ow">or</span> <span class="mi">0</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fingerprint</span><span class="p">,</span>
<span class="p">)</span></div>

</pre></div>

</div>
Expand Down
35 changes: 25 additions & 10 deletions static/yubikey-manager/API_Documentation/_modules/ykman/device.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ykman.device &mdash; yubikey-manager 5.4.0 documentation</title>
<title>ykman.device &mdash; yubikey-manager 5.5.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
Expand All @@ -13,9 +13,9 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=f02a3fcf"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/documentation_options.js?v=a385a3de"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
Expand All @@ -33,7 +33,7 @@
yubikey-manager
</a>
<div class="version">
5.4
5.5
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -155,7 +155,9 @@ <h1>Source code for ykman.device</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">outer</span>


<div class="viewcode-block" id="list_ccid_devices"><a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_ccid_devices">[docs]</a><span class="nd">@_warn_once</span><span class="p">(</span>
<div class="viewcode-block" id="list_ccid_devices">
<a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_ccid_devices">[docs]</a>
<span class="nd">@_warn_once</span><span class="p">(</span>
<span class="s2">&quot;PC/SC not available. Smart card (CCID) protocols will not function.&quot;</span><span class="p">,</span>
<span class="n">EstablishContextException</span><span class="p">,</span>
<span class="p">)</span>
Expand All @@ -164,26 +166,35 @@ <h1>Source code for ykman.device</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">_list_ccid_devices</span><span class="p">()</span></div>


<div class="viewcode-block" id="list_ctap_devices"><a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_ctap_devices">[docs]</a><span class="nd">@_warn_once</span><span class="p">(</span><span class="s2">&quot;No CTAP HID backend available. FIDO protocols will not function.&quot;</span><span class="p">)</span>

<div class="viewcode-block" id="list_ctap_devices">
<a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_ctap_devices">[docs]</a>
<span class="nd">@_warn_once</span><span class="p">(</span><span class="s2">&quot;No CTAP HID backend available. FIDO protocols will not function.&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">list_ctap_devices</span><span class="p">():</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;List CTAP devices.&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">_list_ctap_devices</span><span class="p">()</span></div>


<div class="viewcode-block" id="list_otp_devices"><a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_otp_devices">[docs]</a><span class="nd">@_warn_once</span><span class="p">(</span><span class="s2">&quot;No OTP HID backend available. OTP protocols will not function.&quot;</span><span class="p">)</span>

<div class="viewcode-block" id="list_otp_devices">
<a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_otp_devices">[docs]</a>
<span class="nd">@_warn_once</span><span class="p">(</span><span class="s2">&quot;No OTP HID backend available. OTP protocols will not function.&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">list_otp_devices</span><span class="p">():</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;List OTP devices.&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">_list_otp_devices</span><span class="p">()</span></div>



<span class="n">_CONNECTION_LIST_MAPPING</span> <span class="o">=</span> <span class="p">{</span>
<span class="n">SmartCardConnection</span><span class="p">:</span> <span class="n">list_ccid_devices</span><span class="p">,</span>
<span class="n">OtpConnection</span><span class="p">:</span> <span class="n">list_otp_devices</span><span class="p">,</span>
<span class="n">FidoConnection</span><span class="p">:</span> <span class="n">list_ctap_devices</span><span class="p">,</span>
<span class="p">}</span>


<div class="viewcode-block" id="scan_devices"><a class="viewcode-back" href="../../rst/ykman.html#ykman.device.scan_devices">[docs]</a><span class="k">def</span> <span class="nf">scan_devices</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Mapping</span><span class="p">[</span><span class="n">PID</span><span class="p">,</span> <span class="nb">int</span><span class="p">],</span> <span class="nb">int</span><span class="p">]:</span>
<div class="viewcode-block" id="scan_devices">
<a class="viewcode-back" href="../../rst/ykman.html#ykman.device.scan_devices">[docs]</a>
<span class="k">def</span> <span class="nf">scan_devices</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Mapping</span><span class="p">[</span><span class="n">PID</span><span class="p">,</span> <span class="nb">int</span><span class="p">],</span> <span class="nb">int</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Scan USB for attached YubiKeys, without opening any connections.</span>

<span class="sd"> :return: A dict mapping PID to device count, and a state object which can be used to</span>
Expand Down Expand Up @@ -214,6 +225,7 @@ <h1>Source code for ykman.device</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">merged</span><span class="p">,</span> <span class="nb">hash</span><span class="p">(</span><span class="nb">tuple</span><span class="p">(</span><span class="n">fingerprints</span><span class="p">))</span></div>



<span class="k">class</span> <span class="nc">_PidGroup</span><span class="p">:</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pid</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_pid</span> <span class="o">=</span> <span class="n">pid</span>
Expand Down Expand Up @@ -345,7 +357,9 @@ <h1>Source code for ykman.device</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_group</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_key</span><span class="p">,</span> <span class="n">connection_type</span><span class="p">)</span>


<div class="viewcode-block" id="list_all_devices"><a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_all_devices">[docs]</a><span class="k">def</span> <span class="nf">list_all_devices</span><span class="p">(</span>
<div class="viewcode-block" id="list_all_devices">
<a class="viewcode-back" href="../../rst/ykman.html#ykman.device.list_all_devices">[docs]</a>
<span class="k">def</span> <span class="nf">list_all_devices</span><span class="p">(</span>
<span class="n">connection_types</span><span class="p">:</span> <span class="n">Iterable</span><span class="p">[</span><span class="n">Type</span><span class="p">[</span><span class="n">Connection</span><span class="p">]]</span> <span class="o">=</span> <span class="n">_CONNECTION_LIST_MAPPING</span><span class="o">.</span><span class="n">keys</span><span class="p">(),</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">List</span><span class="p">[</span><span class="n">Tuple</span><span class="p">[</span><span class="n">YkmanDevice</span><span class="p">,</span> <span class="n">DeviceInfo</span><span class="p">]]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Connect to all attached YubiKeys and read device info from them.</span>
Expand All @@ -372,6 +386,7 @@ <h1>Source code for ykman.device</h1><div class="highlight"><pre>
<span class="k">for</span> <span class="n">group</span> <span class="ow">in</span> <span class="n">groups</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
<span class="n">devices</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">group</span><span class="o">.</span><span class="n">get_devices</span><span class="p">())</span>
<span class="k">return</span> <span class="n">devices</span></div>

</pre></div>

</div>
Expand Down
Loading

0 comments on commit ed85046

Please sign in to comment.