Skip to content

Commit

Permalink
[Release 3.9.0] Env vars updated to avoid conflict with customer app.
Browse files Browse the repository at this point in the history
  • Loading branch information
UnumID Admin committed Nov 10, 2021
1 parent 9358d78 commit 2ccecf9
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 48 deletions.
4 changes: 2 additions & 2 deletions docs/classes/custerror.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h3>constructor</h3>
<aside class="tsd-sources">
<p>Overrides Error.constructor</p>
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -153,7 +153,7 @@ <h3>code</h3>
<div class="tsd-signature tsd-kind-icon">code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/utils/error.ts#L5">src/utils/error.ts:5</a></li>
</ul>
</aside>
</section>
Expand Down
39 changes: 26 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,28 @@ <h2>Global Dependencies</h2>
<li>NodeJS v14.0.0 or higher, preferably v14.15.0 or higher</li>
<li>yarn</li>
</ul>
<a href="#logging" id="logging" style="color: inherit; text-decoration: none;">
<h2>Logging</h2>
<a href="#environment-variables" id="environment-variables" style="color: inherit; text-decoration: none;">
<h2>Environment Variables</h2>
</a>
<p>Logs level defaults to Info. One can set to debug for more information via the environment variable LOG_LEVEL, i.e. LOG_LEVEL=debug. We are using standard NPM log levels. More details on the various log levels <a href="https://github.com/winstonjs/winston#logging-levels">here</a>.</p>
<p>The logs default to stdout so can be aggregated using any log provider you would like from disk.</p>
<a href="#debugging" id="debugging" style="color: inherit; text-decoration: none;">
<h2>Debugging</h2>
<p>The following environment variables are required to be set to use the SDK properly.</p>
<ul>
<li><code>UNUM_ENV</code></li>
<li><code>LOG_LEVEL</code></li>
<li><code>DEBUG</code>
<a href="#unum_env" id="unum_env" style="color: inherit; text-decoration: none;">
<h3>UNUM_ENV</h3>
</a>
One needs to provide the SDK the with an environment variable to denote its run time environment, i.e. <code>production</code>. For the Typescript SDK this done via the <code>UNUM_ENV</code> environment variable. The three relevant values are: <code>production</code>, <code>sandbox</code>, <code>dev</code>. You need to use one of these exactly in order for the SDK to communicate with Unum ID&#39;s SaaS. The default value if nothing is supplied is <code>sandbox</code>.</li>
</ul>
<a href="#log_level" id="log_level" style="color: inherit; text-decoration: none;">
<h3>LOG_LEVEL</h3>
</a>
<p>The default logs level is <code>info</code>. You can change this to <code>debug</code> for more information (set the environment variable <code>LOG_LEVEL = debug</code>). The logs default to <code>stdout</code>, so you can easily aggregate them from disk using the log provider of your choice.</p>
<p>We use standard NPM log levels. Learn more about these <a href="https://github.com/winstonjs/winston#logging-levels">here</a>.</p>
<a href="#debug" id="debug" style="color: inherit; text-decoration: none;">
<h3>DEBUG</h3>
</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>
<p>The <code>DEBUG</code> environment variable defaults to <code>false</code>. Setting to <code>true</code> enables logging of decrypted presentations at the <code>debug</code> level. Due to presentations containing potentially sensitive information it is <em>not</em> advised to use in a production environment. Note: the <code>LOG_LEVEL</code> envirnoment variable also needs to be set to at least <code>debug</code> level in order to be visible.</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>
Expand Down Expand Up @@ -137,14 +150,14 @@ <h3>registerIssuer</h3>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;publicKey&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// subjects and verifiers use this to verify your signatures on credentials</span>
<span style="color: #000000"> }</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;encryption&quot;</span><span style="color: #000000">: {</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;privateKey&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// you use this to encrypt credentials you send to subjects</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;publicKey&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// subjects use this to decrypt credentials they receive from you</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;privateKey&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// not used</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;publicKey&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// not used; but part of the issuer did doc</span>
<span style="color: #000000"> }</span>
<span style="color: #000000"> }</span>
<span style="color: #000000">}</span>
</code></pre>
<a href="#issuecredential" id="issuecredential" style="color: inherit; text-decoration: none;">
<h3>issueCredential</h3>
<a href="#issuecredentials" id="issuecredentials" style="color: inherit; text-decoration: none;">
<h3>issueCredentials</h3>
</a>
<p>Issue a credential to a Subject, also known as a User.</p>
<p>You need to provide your Issuer DID (created when you registered), as well as your signing and encryption private keys, which the Issuer uses to sign and encrypt the credential. You need to specify a credential <code>type</code>, which verifiers will use to later request the credential from the user.</p>
Expand All @@ -161,7 +174,7 @@ <h3>issueCredential</h3>
<span style="color: #A31515">&quot;expirationDate&quot;</span><span style="color: #000000">?: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// (optional) when credential will no longer be valid (ISO 8601 date/time)</span>
</code></pre>
<p>Response Body: <a href="https://docs.unum.id/Server-SDK-Typescript/interfaces/credential.html"><strong>Credential</strong></a></p>
<pre><code class="language-typescript"><span style="color: #000000">{</span>
<pre><code class="language-typescript"><span style="color: #000000">{[</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;@context&quot;</span><span style="color: #000000">: [</span><span style="color: #A31515">&quot;https://www.w3.org/2018/credentials/v1&quot;</span><span style="color: #000000">], </span><span style="color: #008000">// for conformance with W3C Verifiable Credential spec</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;credentialStatus&quot;</span><span style="color: #000000">: {</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;id&quot;</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// a url for credential&#039;s status</span>
Expand All @@ -177,7 +190,7 @@ <h3>issueCredential</h3>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;issuanceDate&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when credential was issued (ISO 8601 date/time)</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;expirationDate&quot;</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// when credential will no longer be valid (ISO 8601 date-time)</span>
<span style="color: #000000"> </span><span style="color: #A31515">&quot;proof&quot;</span><span style="color: #000000">: </span><span style="color: #001080">Proof</span><span style="color: #000000"> </span><span style="color: #008000">// cryptographic proof created by signing credential with your issuer signing private key. Can be used to verify credential.</span>
<span style="color: #000000">}</span>
<span style="color: #000000">]}</span>
</code></pre>
<a href="#updatecredentialstatus" id="updatecredentialstatus" style="color: inherit; text-decoration: none;">
<h3>updateCredentialStatus</h3>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/credentialinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3>credential<wbr>Types</h3>
<div class="tsd-signature tsd-kind-icon">credential<wbr>Types<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L155">src/types.d.ts:155</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L155">src/types.d.ts:155</a></li>
</ul>
</aside>
</section>
Expand All @@ -112,7 +112,7 @@ <h3>subject<wbr>Did</h3>
<div class="tsd-signature tsd-kind-icon">subject<wbr>Did<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L156">src/types.d.ts:156</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L156">src/types.d.ts:156</a></li>
</ul>
</aside>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/credentialstatusinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3>created<wbr>At</h3>
<div class="tsd-signature tsd-kind-icon">created<wbr>At<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L110">src/types.d.ts:110</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L110">src/types.d.ts:110</a></li>
</ul>
</aside>
</section>
Expand All @@ -114,7 +114,7 @@ <h3>credential<wbr>Id</h3>
<div class="tsd-signature tsd-kind-icon">credential<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L112">src/types.d.ts:112</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L112">src/types.d.ts:112</a></li>
</ul>
</aside>
</section>
Expand All @@ -124,7 +124,7 @@ <h3>status</h3>
<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;valid&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;revoked&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L113">src/types.d.ts:113</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L113">src/types.d.ts:113</a></li>
</ul>
</aside>
</section>
Expand All @@ -134,7 +134,7 @@ <h3>updated<wbr>At</h3>
<div class="tsd-signature tsd-kind-icon">updated<wbr>At<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L111">src/types.d.ts:111</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L111">src/types.d.ts:111</a></li>
</ul>
</aside>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/interfaces/decryptedpresentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h3>is<wbr>Verified</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="verifiedstatus.html">VerifiedStatus</a>.<a href="verifiedstatus.html#isverified">isVerified</a></p>
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L137">src/types.d.ts:137</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L137">src/types.d.ts:137</a></li>
</ul>
</aside>
</section>
Expand All @@ -123,7 +123,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> message</h3>
<aside class="tsd-sources">
<p>Inherited from <a href="verifiedstatus.html">VerifiedStatus</a>.<a href="verifiedstatus.html#message">message</a></p>
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L138">src/types.d.ts:138</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L138">src/types.d.ts:138</a></li>
</ul>
</aside>
</section>
Expand All @@ -133,7 +133,7 @@ <h3>presentation</h3>
<div class="tsd-signature tsd-kind-icon">presentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Presentation</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L148">src/types.d.ts:148</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L148">src/types.d.ts:148</a></li>
</ul>
</aside>
</section>
Expand All @@ -143,7 +143,7 @@ <h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;VerifiablePresentation&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;DeclinedPresentation&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L147">src/types.d.ts:147</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L147">src/types.d.ts:147</a></li>
</ul>
</aside>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/registeredissuer.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h3>keys</h3>
<div class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyPairSet</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L63">src/types.d.ts:63</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L63">src/types.d.ts:63</a></li>
</ul>
</aside>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/registeredverifier.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ <h3>keys</h3>
<div class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">KeyPairSet</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L128">src/types.d.ts:128</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L128">src/types.d.ts:128</a></li>
</ul>
</aside>
</section>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/unumdto.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h3>auth<wbr>Token</h3>
<div class="tsd-signature tsd-kind-icon">auth<wbr>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L163">src/types.d.ts:163</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L163">src/types.d.ts:163</a></li>
</ul>
</aside>
</section>
Expand All @@ -120,7 +120,7 @@ <h3>body</h3>
<div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">T</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L164">src/types.d.ts:164</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L164">src/types.d.ts:164</a></li>
</ul>
</aside>
</section>
Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/verifiedstatus.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h3>is<wbr>Verified</h3>
<div class="tsd-signature tsd-kind-icon">is<wbr>Verified<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L137">src/types.d.ts:137</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L137">src/types.d.ts:137</a></li>
</ul>
</aside>
</section>
Expand All @@ -119,7 +119,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> message</h3>
<div class="tsd-signature tsd-kind-icon">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/b3a8c63/src/types.d.ts#L138">src/types.d.ts:138</a></li>
<li>Defined in <a href="https://github.com/UnumID/server-sdk-typescript/blob/9358d78/src/types.d.ts#L138">src/types.d.ts:138</a></li>
</ul>
</aside>
</section>
Expand Down
Loading

0 comments on commit 2ccecf9

Please sign in to comment.