-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release 3.1.0] Issuer and Verifier registration parameter, name, rem…
…oved in favor of taking the name from the ApiKey used. Readme typos fixed.
- Loading branch information
UnumID Admin
committed
Jul 14, 2021
1 parent
0be3bdc
commit 4499c8e
Showing
13 changed files
with
106 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,15 +58,22 @@ <h1>@unumid/server-sdk</h1> | |
<div class="row"> | ||
<div class="col-8 col-content"> | ||
<div class="tsd-panel tsd-typography"> | ||
<p>This SDK combines the functionality of an <a href="#issuer"><strong>Issuer</strong></a> and <a href="#verifier"><strong>Verifier</strong></a> entities to work with UnumID's SaaS. For necessary account creation and API keys please email <a href="mailto:[email protected]">[email protected]</a>.</p> | ||
<a href="#unum-id-typescript-server-sdk" id="unum-id-typescript-server-sdk" style="color: inherit; text-decoration: none;"> | ||
<h1>Unum ID Typescript Server-SDK</h1> | ||
</a> | ||
<p>This SDK combines the functionality of an <a href="https://docs.unum.id/terminology#issuer"><strong>Issuer</strong></a> and <a href="https://docs.unum.id/terminology#verifier"><strong>Verifier</strong></a> entities to work with UnumID's SaaS. For necessary account creation and API keys please email <a href="mailto:[email protected]">[email protected]</a>.</p> | ||
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;"> | ||
<h2>Documentation</h2> | ||
</a> | ||
<p>High level technical documentation can be found <a href="https://docs.unum.id/server-sdk">here</a> which is served via <a href="https://github.com/UnumID/UnumID.github.io">Docusaurus</a>. More detailed generated from source documentation can be found <a href="https://docs.unum.id/Server-SDK-Typescript/index.html">here</a> which is served via repo specific Github pages via the /docs folder of the main branch.</p> | ||
<a href="#distribution" id="distribution" style="color: inherit; text-decoration: none;"> | ||
<h2>Distribution</h2> | ||
</a> | ||
<p>This project is publicly published on the official npm <a href="https://www.npmjs.com/package/@unumid/server-sdk">registry</a>. For example it can be pulled with, <code>npm i @unumid/server-sdk</code> or <code>yarn add @unumid/server-sdk</code>.</p> | ||
<a href="#releases" id="releases" style="color: inherit; text-decoration: none;"> | ||
<h2>Releases</h2> | ||
</a> | ||
<p>Releases and publishing to NPM is automated via Github Actions CI job. In order to trigger a release one should push a git tag with a preceding <code>v</code> with semver notation, ie v1.1.1, to the <code>main</code> branch. This will trigger the CI job to bump the package version, generate typedocs, publish to NPM, make a release commit, and make a Github Release. The message of the git tag will be the release message so please make it meaningful. For example, <code>git tag v1.2.0 -m "Updated the SDK with a new CI job" && push origin v1.1.1</code>.</p> | ||
<p>Releases and publishing to NPM is automated via Github Actions CI job. In order to trigger a release one should push a git tag with a preceding <code>v</code> with semver notation, ie <code>v1.1.1</code>, to the <code>main</code> branch. This will trigger the CI job to bump the package version, generate typedocs, publish to NPM, make a release commit, and make a Github Release. The message of the git tag will be the release message so please make it meaningful. For example, <code>git tag v1.1.1 -m "Updated the SDK with a new CI job" && push origin v1.1.1</code>.</p> | ||
<a href="#global-dependencies" id="global-dependencies" style="color: inherit; text-decoration: none;"> | ||
<h2>Global Dependencies</h2> | ||
</a> | ||
|
@@ -83,11 +90,13 @@ <h2>Logging</h2> | |
<h2>Debugging</h2> | ||
</a> | ||
<p>The <code>NODE_ENV</code> environment variable defaults to <code>sandbox</code>. However while debugging one can use the <code>debug</code> environment setting. This enables logging of decrypted presentations at the <code>debug</code> level. Due to presentations containing sensitive information it is not advised to use in a production environment.</p> | ||
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;"> | ||
<h2>Documentation</h2> | ||
</a> | ||
<p>High level technical documentation can be found <a href="https://https://docs.unum.id/server-sdk">here</a> which is served via <a href="https://github.com/UnumID/UnumID.github.io">Docusaurus</a>. More detailed generated from source documentation can be found <a href="https://docs.unum.id/Server-SDK-Typescript/index.html">here</a> which is served via repo specific Github pages via the /docs folder of the main branch.</p> | ||
<p>In order to generate the Typedoc documentation from the source code run the <code>createTypedocs.sh</code> script.</p> | ||
<a href="#versioning" id="versioning" style="color: inherit; text-decoration: none;"> | ||
<h2>Versioning</h2> | ||
</a> | ||
<p>Information regarding the suggested versioning strategy can be found <a href="https://docs.unum.id/deployment-overview#versioning-strategy">here</a>. | ||
Breaking versions of this SDK will be denoted as such with an incremented major version. However all versions of the SDK will be fully backwards compatible with the other Unum ID SDKs. If there is a need to referencing an older version of the SDK within your applications for other applications specific backwards compatibility we recommend this syntax for simplicity: | ||
<code>@unumid/server-sdk-v2": "npm:@unumid/[email protected]</code>.</p> | ||
<a href="#sdk-functionality" id="sdk-functionality" style="color: inherit; text-decoration: none;"> | ||
<h2>SDK Functionality</h2> | ||
</a> | ||
|
@@ -111,16 +120,15 @@ <h3>registerIssuer</h3> | |
<p>Register an issuer corresponding to your customer UUID and issuer API key provided by UnumID. As a customer, you can register as many issuers as you like (or none at all), depending on your use case. Note, however, that you'll need a unique issuer API key for each one.</p> | ||
<p>You should store the DID (<code>did</code>) and encryption and signing key pairs (<code>keys</code>) that this returns. You'll need these to issue credentials to users.</p> | ||
<p>Parameters:</p> | ||
<pre><code class="language-typescript"><span style="color: #A31515">"name"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human readable name for issuer. Displayed to users in mobile apps when verifiers request credentials.</span> | ||
<span style="color: #A31515">"customerUuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span> | ||
<pre><code class="language-typescript"><span style="color: #A31515">"customerUuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span> | ||
<span style="color: #A31515">"apiKey"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000"> </span><span style="color: #008000">// your issuer API key</span> | ||
</code></pre> | ||
<p>Response Body: <a href="https://docs.unum.id/Server-SDK-Typescript/interfaces/registeredissuer.html"><strong>RegisteredIssuer</strong></a></p> | ||
<pre><code class="language-typescript"><span style="color: #000000">{</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"uuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies issuer in Unum ID database</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"customerUuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies customer in Unum ID database</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"did"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies issuer in Unum ID ecosystem</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"name"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for issuer</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"name"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for issuer. Displayed to users in mobile apps when verifiers request credentials. Comes from the name of the ApiKey used to register the Issuer.</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"createdAt"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when issuer was registered</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"updatedAt"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when issuer was last updated</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"keys"</span><span style="color: #000000">: {</span> | ||
|
@@ -197,8 +205,7 @@ <h3>registerVerifier</h3> | |
<p>Register a verifier corresponding to your customer UUID and verifier API key that UnumID provides. As a customer, you can register as many verifiers as you like (or none at all), depending on your use case. Note, however, that you'll need a unique verifier API key for each one.</p> | ||
<p>You should store the DID (<code>did</code>) and signing key pair (<code>keys</code>) that this returns. You'll need these to create requests for (presentations of) credentials from users.</p> | ||
<p>Parameters</p> | ||
<pre><code class="language-typescript"><span style="color: #A31515">"name"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human readable name for verifier. Displayed to users in mobile apps when you make requests.</span> | ||
<span style="color: #A31515">"customerUuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span> | ||
<pre><code class="language-typescript"><span style="color: #A31515">"customerUuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// your customer UUID</span> | ||
<span style="color: #A31515">"url"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// the url of which UnumID's SaaS will interface with</span> | ||
<span style="color: #A31515">"apiKey"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000"> </span><span style="color: #008000">// your verifier API key</span> | ||
</code></pre> | ||
|
@@ -207,7 +214,7 @@ <h3>registerVerifier</h3> | |
<span style="color: #000000"> </span><span style="color: #A31515">"uuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies verifier in Unum ID database</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"customerUuid"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies customer in Unum ID database</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"did"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifiers verifier in Unum ID ecosystem</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"name"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for verifier</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"name"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// human-readable name for verifier. Displayed to users in mobile apps when you make requests. Comes from the name of the ApiKey used to register the Verifier.</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"createdAt"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when verifier was registered (ISO 8601 date/time)</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"updatedAt"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when verifier was last updated (ISO 8601 date/time)</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"keys"</span><span style="color: #000000">: {</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.