mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-06-13 09:44:50 +08:00
946 lines
53 KiB
HTML
946 lines
53 KiB
HTML
<!doctype html>
|
|
<html class="default no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>UserSession | blockstack</title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="tsd-page-toolbar">
|
|
<div class="container">
|
|
<div class="table-wrap">
|
|
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
|
|
<div class="field">
|
|
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
<input id="tsd-search-field" type="text" />
|
|
</div>
|
|
<ul class="results">
|
|
<li class="state loading">Preparing search index...</li>
|
|
<li class="state failure">The search index is not available</li>
|
|
</ul>
|
|
<a href="../index.html" class="title">blockstack</a>
|
|
</div>
|
|
<div class="table-cell" id="tsd-widgets">
|
|
<div id="tsd-filter">
|
|
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
<div class="tsd-filter-group">
|
|
<div class="tsd-select" id="tsd-filter-visibility">
|
|
<span class="tsd-select-label">All</span>
|
|
<ul class="tsd-select-list">
|
|
<li data-value="public">Public</li>
|
|
<li data-value="protected">Public/Protected</li>
|
|
<li data-value="private" class="selected">All</li>
|
|
</ul>
|
|
</div>
|
|
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
<input type="checkbox" id="tsd-filter-only-exported" />
|
|
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
|
</div>
|
|
</div>
|
|
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tsd-page-title">
|
|
<div class="container">
|
|
<ul class="tsd-breadcrumb">
|
|
<li>
|
|
<a href="../index.html">Globals</a>
|
|
</li>
|
|
<li>
|
|
<a href="usersession.html">UserSession</a>
|
|
</li>
|
|
</ul>
|
|
<h1>Class UserSession</h1>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="container container-main">
|
|
<div class="row">
|
|
<div class="col-8 col-content">
|
|
<section class="tsd-panel tsd-comment">
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Represents an instance of a signed in user for a particular app.</p>
|
|
</div>
|
|
<p>A signed in user has access to two major pieces of information
|
|
about the user, the user's private key for that app and the location
|
|
of the user's gaia storage bucket for the app.</p>
|
|
<p>A user can be signed in either directly through the interactive
|
|
sign in process or by directly providing the app private key.</p>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>type</dt>
|
|
<dd><p>{UserSession}</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</section>
|
|
<section class="tsd-panel tsd-hierarchy">
|
|
<h3>Hierarchy</h3>
|
|
<ul class="tsd-hierarchy">
|
|
<li>
|
|
<span class="target">UserSession</span>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-index-group">
|
|
<h2>Index</h2>
|
|
<section class="tsd-panel tsd-index-panel">
|
|
<div class="tsd-index-content">
|
|
<section class="tsd-index-section ">
|
|
<h3>Constructors</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="usersession.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-index-section ">
|
|
<h3>Properties</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-property tsd-parent-kind-class"><a href="usersession.html#appconfig" class="tsd-kind-icon">app<wbr>Config</a></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-class"><a href="usersession.html#store" class="tsd-kind-icon">store</a></li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-index-section ">
|
|
<h3>Methods</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#decryptcontent" class="tsd-kind-icon">decrypt<wbr>Content</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="usersession.html#deletefile" class="tsd-kind-icon">delete<wbr>File</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#encryptcontent" class="tsd-kind-icon">encrypt<wbr>Content</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#generateandstoretransitkey" class="tsd-kind-icon">generate<wbr>And<wbr>Store<wbr>Transit<wbr>Key</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#getauthresponsetoken" class="tsd-kind-icon">get<wbr>Auth<wbr>Response<wbr>Token</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#getfile" class="tsd-kind-icon">get<wbr>File</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#getfileurl" class="tsd-kind-icon">get<wbr>File<wbr>Url</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#handlependingsignin" class="tsd-kind-icon">handle<wbr>Pending<wbr>Sign<wbr>In</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#issigninpending" class="tsd-kind-icon">is<wbr>Sign<wbr>InPending</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#isusersignedin" class="tsd-kind-icon">is<wbr>User<wbr>Signed<wbr>In</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#listfiles" class="tsd-kind-icon">list<wbr>Files</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#loaduserdata" class="tsd-kind-icon">load<wbr>User<wbr>Data</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="usersession.html#makeauthrequest" class="tsd-kind-icon">make<wbr>Auth<wbr>Request</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#putfile" class="tsd-kind-icon">put<wbr>File</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#redirecttosignin" class="tsd-kind-icon">redirect<wbr>ToSign<wbr>In</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#redirecttosigninwithauthrequest" class="tsd-kind-icon">redirect<wbr>ToSign<wbr>InWith<wbr>Auth<wbr>Request</a></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="usersession.html#signuserout" class="tsd-kind-icon">sign<wbr>User<wbr>Out</a></li>
|
|
</ul>
|
|
</section>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
<h2>Constructors</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
|
|
<a name="constructor" class="tsd-anchor"></a>
|
|
<h3>constructor</h3>
|
|
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">new <wbr>User<wbr>Session<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="usersession.html" class="tsd-signature-type">UserSession</a></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L56">auth/userSession.ts:56</a></li>
|
|
</ul>
|
|
</aside>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">object</span></h5>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> app<wbr>Config<span class="tsd-signature-symbol">?: </span><a href="appconfig.html" class="tsd-signature-type">AppConfig</a></h5>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> session<wbr>Options<span class="tsd-signature-symbol">?: </span><a href="../index.html#sessionoptions" class="tsd-signature-type">SessionOptions</a></h5>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> session<wbr>Store<span class="tsd-signature-symbol">?: </span><a href="sessiondatastore.html" class="tsd-signature-type">SessionDataStore</a></h5>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="usersession.html" class="tsd-signature-type">UserSession</a></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
<h2>Properties</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
|
<a name="appconfig" class="tsd-anchor"></a>
|
|
<h3>app<wbr>Config</h3>
|
|
<div class="tsd-signature tsd-kind-icon">app<wbr>Config<span class="tsd-signature-symbol">:</span> <a href="appconfig.html" class="tsd-signature-type">AppConfig</a></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L54">auth/userSession.ts:54</a></li>
|
|
</ul>
|
|
</aside>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
|
<a name="store" class="tsd-anchor"></a>
|
|
<h3>store</h3>
|
|
<div class="tsd-signature tsd-kind-icon">store<span class="tsd-signature-symbol">:</span> <a href="sessiondatastore.html" class="tsd-signature-type">SessionDataStore</a></div>
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L56">auth/userSession.ts:56</a></li>
|
|
</ul>
|
|
</aside>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
<h2>Methods</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="decryptcontent" class="tsd-anchor"></a>
|
|
<h3>decrypt<wbr>Content</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">decrypt<wbr>Content<span class="tsd-signature-symbol">(</span>content<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L265">auth/userSession.ts:265</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Decrypts data encrypted with <code>encryptContent</code> with the
|
|
transit private key.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>content: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>encrypted content.</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">object</span></h5>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> private<wbr>Key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the hex string of the ECDSA private
|
|
key to use for decryption. If not provided, will use user's appPrivateKey.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span>
|
|
<span class="tsd-signature-symbol"> | </span>
|
|
<span class="tsd-signature-type">Buffer</span>
|
|
</h4>
|
|
<p>decrypted content.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
<a name="deletefile" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagPrivate">Private</span> delete<wbr>File</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
<li class="tsd-signature tsd-kind-icon">delete<wbr>File<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L342">auth/userSession.ts:342</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Deletes the specified file from the app's data store. Currently not implemented.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>path: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the path to the file to delete</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
<p>that resolves when the file has been removed
|
|
or rejects with an error</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="encryptcontent" class="tsd-anchor"></a>
|
|
<h3>encrypt<wbr>Content</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">encrypt<wbr>Content<span class="tsd-signature-symbol">(</span>content<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L251">auth/userSession.ts:251</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Encrypts the data provided with the app public key.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>content: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>data to encrypt</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">object</span></h5>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> public<wbr>Key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the hex string of the ECDSA public
|
|
key to use for encryption. If not provided, will use user's appPrivateKey.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
<p>Stringified ciphertext object</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="generateandstoretransitkey" class="tsd-anchor"></a>
|
|
<h3>generate<wbr>And<wbr>Store<wbr>Transit<wbr>Key</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">generate<wbr>And<wbr>Store<wbr>Transit<wbr>Key<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L168">auth/userSession.ts:168</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Generates a ECDSA keypair to
|
|
use as the ephemeral app transit private key
|
|
and store in the session</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
<p>the hex encoded private key</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="getauthresponsetoken" class="tsd-anchor"></a>
|
|
<h3>get<wbr>Auth<wbr>Response<wbr>Token</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">get<wbr>Auth<wbr>Response<wbr>Token<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L180">auth/userSession.ts:180</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Retrieve the authentication token from the URL query</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
<p>the authentication token if it exists otherwise <code>null</code></p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="getfile" class="tsd-anchor"></a>
|
|
<h3>get<wbr>File</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">get<wbr>File<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><a href="../index.html#getfileoptions" class="tsd-signature-type">GetFileOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L301">auth/userSession.ts:301</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Retrieves the specified file from the app's data store.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>path: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the path to the file to read</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../index.html#getfileoptions" class="tsd-signature-type">GetFileOptions</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4>
|
|
<p>that resolves to the raw data in the file
|
|
or rejects with an error</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="getfileurl" class="tsd-anchor"></a>
|
|
<h3>get<wbr>File<wbr>Url</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">get<wbr>File<wbr>Url<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L317">auth/userSession.ts:317</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Get the URL for reading a file from an app's data store.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>path: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the path to the file to read</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">object</span></h5>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> app<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the app to lookup for multi-player storage -
|
|
defaults to current origin</p>
|
|
</div>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> username<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the Blockstack ID to lookup for multi-player storage</p>
|
|
</div>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> zone<wbr>File<wbr>LookupURL<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4>
|
|
<p>that resolves to the URL or rejects with an error</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="handlependingsignin" class="tsd-anchor"></a>
|
|
<h3>handle<wbr>Pending<wbr>Sign<wbr>In</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">handle<wbr>Pending<wbr>Sign<wbr>In<span class="tsd-signature-symbol">(</span>authResponseToken<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/userdata.html" class="tsd-signature-type">UserData</a><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L209">auth/userSession.ts:209</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Try to process any pending sign in request by returning a <code>Promise</code> that resolves
|
|
to the user data object if the sign in succeeds.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> authResponseToken: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = this.getAuthResponseToken()</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the signed authentication response token</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/userdata.html" class="tsd-signature-type">UserData</a><span class="tsd-signature-symbol">></span></h4>
|
|
<p>that resolves to the user data object if successful and rejects
|
|
if handling the sign in request fails or there was no pending sign in request.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="issigninpending" class="tsd-anchor"></a>
|
|
<h3>is<wbr>Sign<wbr>InPending</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">is<wbr>Sign<wbr>InPending<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L189">auth/userSession.ts:189</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Check if there is a authentication request that hasn't been handled.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
|
|
<p><code>true</code> if there is a pending sign in, otherwise <code>false</code></p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="isusersignedin" class="tsd-anchor"></a>
|
|
<h3>is<wbr>User<wbr>Signed<wbr>In</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">is<wbr>User<wbr>Signed<wbr>In<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L197">auth/userSession.ts:197</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Check if a user is currently signed in.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
|
|
<p><code>true</code> if the user is signed in, <code>false</code> if not.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="listfiles" class="tsd-anchor"></a>
|
|
<h3>list<wbr>Files</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">list<wbr>Files<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L331">auth/userSession.ts:331</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>List the set of files in this application's Gaia storage bucket.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>callback: <span class="tsd-signature-type">function</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>a callback to invoke on each named file that
|
|
returns <code>true</code> to continue the listing operation or <code>false</code> to end it</p>
|
|
</div>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter-siganture">
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>name: <span class="tsd-signature-type">string</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4>
|
|
<p>that resolves to the number of files listed</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="loaduserdata" class="tsd-anchor"></a>
|
|
<h3>load<wbr>User<wbr>Data</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">load<wbr>User<wbr>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/userdata.html" class="tsd-signature-type">UserData</a></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L217">auth/userSession.ts:217</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Retrieves the user data object. The user's profile is stored in the key <code>profile</code>.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/userdata.html" class="tsd-signature-type">UserData</a></h4>
|
|
<p>User data object.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
<a name="makeauthrequest" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagPrivate">Private</span> make<wbr>Auth<wbr>Request</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
<li class="tsd-signature tsd-kind-icon">make<wbr>Auth<wbr>Request<span class="tsd-signature-symbol">(</span>transitKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, expiresAt<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, extraParams<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L145">auth/userSession.ts:145</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Generates an authentication request that can be sent to the Blockstack
|
|
browser for the user to approve sign in. This authentication request can
|
|
then be used for sign in by passing it to the <code>redirectToSignInWithAuthRequest</code>
|
|
method.</p>
|
|
</div>
|
|
<p><em>Note: This method should only be used if you want to roll your own authentication
|
|
flow. Typically you'd use <code>redirectToSignIn</code> which takes care of this
|
|
under the hood.</em></p>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>transitKey: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>hex-encoded transit key</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> expiresAt: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = nextHour().getTime()</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the time at which this request is no longer valid</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> extraParams: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>Any extra parameters you'd like to pass to the authenticator.
|
|
Use this to pass options that aren't part of the Blockstack auth spec, but might be supported
|
|
by special authenticators.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
<p>the authentication request</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="putfile" class="tsd-anchor"></a>
|
|
<h3>put<wbr>File</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">put<wbr>File<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, content<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../index.html#putfileoptions" class="tsd-signature-type">PutFileOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">></span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L281">auth/userSession.ts:281</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Stores the data provided in the app's data store to to the file specified.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>path: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the path to store the data in</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>content: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Buffer</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the data to store in the file</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../index.html#putfileoptions" class="tsd-signature-type">PutFileOptions</a></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">></span></h4>
|
|
<p>that resolves if the operation succeed and rejects
|
|
if it failed</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="redirecttosignin" class="tsd-anchor"></a>
|
|
<h3>redirect<wbr>ToSign<wbr>In</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">redirect<wbr>ToSign<wbr>In<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L109">auth/userSession.ts:109</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Generates an authentication request and redirects the user to the Blockstack
|
|
browser to approve the sign in request.</p>
|
|
</div>
|
|
<p>Please note that this requires that the web browser properly handles the
|
|
<code>blockstack:</code> URL protocol handler.</p>
|
|
<p>Most applications should use this
|
|
method for sign in unless they require more fine grained control over how the
|
|
authentication request is generated. If your app falls into this category,
|
|
use <code>generateAndStoreTransitKey</code>, <code>makeAuthRequest</code>,
|
|
and <code>redirectToSignInWithAuthRequest</code> to build your own sign in process.</p>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="redirecttosigninwithauthrequest" class="tsd-anchor"></a>
|
|
<h3>redirect<wbr>ToSign<wbr>InWith<wbr>Auth<wbr>Request</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">redirect<wbr>ToSign<wbr>InWith<wbr>Auth<wbr>Request<span class="tsd-signature-symbol">(</span>authRequest<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L124">auth/userSession.ts:124</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Redirects the user to the Blockstack browser to approve the sign in request
|
|
given.</p>
|
|
</div>
|
|
<p>The user is redirected to the authenticator URL specified in the <code>AppConfig</code>
|
|
if the <code>blockstack:</code> protocol handler is not detected.
|
|
Please note that the protocol handler detection
|
|
does not work on all browsers.</p>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>authRequest: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>the authentication request generated by <code>makeAuthRequest</code></p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
<a name="signuserout" class="tsd-anchor"></a>
|
|
<h3>sign<wbr>User<wbr>Out</h3>
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
<li class="tsd-signature tsd-kind-icon">sign<wbr>User<wbr>Out<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/blockstack/blockstack.js/blob/f9be48c/src/auth/userSession.ts#L226">auth/userSession.ts:226</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Sign the user out</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
<nav class="tsd-navigation primary">
|
|
<ul>
|
|
<li class="globals ">
|
|
<a href="../index.html"><em>Globals</em></a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul class="before-current">
|
|
</ul>
|
|
<ul class="current">
|
|
<li class="current tsd-kind-class">
|
|
<a href="usersession.html" class="tsd-kind-icon">User<wbr>Session</a>
|
|
<ul>
|
|
<li class=" tsd-kind-constructor tsd-parent-kind-class">
|
|
<a href="usersession.html#constructor" class="tsd-kind-icon">constructor</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-class">
|
|
<a href="usersession.html#appconfig" class="tsd-kind-icon">app<wbr>Config</a>
|
|
</li>
|
|
<li class=" tsd-kind-property tsd-parent-kind-class">
|
|
<a href="usersession.html#store" class="tsd-kind-icon">store</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#decryptcontent" class="tsd-kind-icon">decrypt<wbr>Content</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
<a href="usersession.html#deletefile" class="tsd-kind-icon">delete<wbr>File</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#encryptcontent" class="tsd-kind-icon">encrypt<wbr>Content</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#generateandstoretransitkey" class="tsd-kind-icon">generate<wbr>And<wbr>Store<wbr>Transit<wbr>Key</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#getauthresponsetoken" class="tsd-kind-icon">get<wbr>Auth<wbr>Response<wbr>Token</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#getfile" class="tsd-kind-icon">get<wbr>File</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#getfileurl" class="tsd-kind-icon">get<wbr>File<wbr>Url</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#handlependingsignin" class="tsd-kind-icon">handle<wbr>Pending<wbr>Sign<wbr>In</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#issigninpending" class="tsd-kind-icon">is<wbr>Sign<wbr>InPending</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#isusersignedin" class="tsd-kind-icon">is<wbr>User<wbr>Signed<wbr>In</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#listfiles" class="tsd-kind-icon">list<wbr>Files</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#loaduserdata" class="tsd-kind-icon">load<wbr>User<wbr>Data</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
<a href="usersession.html#makeauthrequest" class="tsd-kind-icon">make<wbr>Auth<wbr>Request</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#putfile" class="tsd-kind-icon">put<wbr>File</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#redirecttosignin" class="tsd-kind-icon">redirect<wbr>ToSign<wbr>In</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#redirecttosigninwithauthrequest" class="tsd-kind-icon">redirect<wbr>ToSign<wbr>InWith<wbr>Auth<wbr>Request</a>
|
|
</li>
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
<a href="usersession.html#signuserout" class="tsd-kind-icon">sign<wbr>User<wbr>Out</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<ul class="after-current">
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="with-border-bottom">
|
|
<div class="container">
|
|
<h2>Legend</h2>
|
|
<div class="tsd-legend-group">
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
|
|
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
|
|
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
|
|
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
|
|
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
|
|
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
|
|
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<div class="container tsd-generator">
|
|
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
</div>
|
|
<div class="overlay"></div>
|
|
<script src="../assets/js/main.js"></script>
|
|
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
|
|
</body>
|
|
</html> |