wombo-dream-api
Version:
Unofficial API for Wombo Dream
33 lines • 39.4 kB
HTML
<html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GoogleAuthentifier | wombo-dream-api</title><meta name="description" content="Documentation for wombo-dream-api"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></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">wombo-dream-api</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-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</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="../modules.html">wombo-dream-api</a></li><li><a href="../modules/GoogleAuthentifier.html">GoogleAuthentifier</a></li><li><a href="GoogleAuthentifier.GoogleAuthentifier-1.html">GoogleAuthentifier</a></li></ul><h1>Class GoogleAuthentifier</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">GoogleAuthentifier</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="GoogleAuthentifier.GoogleAuthentifier-1.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="GoogleAuthentifier.GoogleAuthentifier-1.html#authorisationDataCache" class="tsd-kind-icon">authorisation<wbr/>Data<wbr/>Cache</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#credentials" class="tsd-kind-icon">credentials</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#secret_key" class="tsd-kind-icon">secret_<wbr/>key</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signInUserUrlTemplate" class="tsd-kind-icon">sign<wbr/>In<wbr/>User<wbr/>Url<wbr/>Template</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signUpUserUrlTemplate" class="tsd-kind-icon">sign<wbr/>Up<wbr/>User<wbr/>Url<wbr/>Template</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#tokenRefreshUrlTemplate" class="tsd-kind-icon">token<wbr/>Refresh<wbr/>Url<wbr/>Template</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="GoogleAuthentifier.GoogleAuthentifier-1.html#buildSignInUserUrl" class="tsd-kind-icon">build<wbr/>Sign<wbr/>In<wbr/>User<wbr/>Url</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#buildSignUpUserUrl" class="tsd-kind-icon">build<wbr/>Sign<wbr/>Up<wbr/>User<wbr/>Url</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#buildTokenRefreshUrl" class="tsd-kind-icon">build<wbr/>Token<wbr/>Refresh<wbr/>Url</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#ensureCacheValidity" class="tsd-kind-icon">ensure<wbr/>Cache<wbr/>Validity</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#isCacheValid" class="tsd-kind-icon">is<wbr/>Cache<wbr/>Valid</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#obtainAuthorisationToken" class="tsd-kind-icon">obtain<wbr/>Authorisation<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#refreshAuthorisationToken" class="tsd-kind-icon">refresh<wbr/>Authorisation<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signIn" class="tsd-kind-icon">sign<wbr/>In</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signUp" class="tsd-kind-icon">sign<wbr/>Up</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 id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Google<wbr/>Authentifier<span class="tsd-signature-symbol">(</span>secret_key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, credentials<span class="tsd-signature-symbol">?: </span><a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="GoogleAuthentifier.GoogleAuthentifier-1.html" class="tsd-signature-type" data-tsd-kind="Class">GoogleAuthentifier</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L17">src/GoogleAuthentifier.ts:17</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>secret_key: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> credentials: <a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="GoogleAuthentifier.GoogleAuthentifier-1.html" class="tsd-signature-type" data-tsd-kind="Class">GoogleAuthentifier</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 id="authorisationDataCache" class="tsd-anchor"></a><h3 class="tsd-anchor-link">authorisation<wbr/>Data<wbr/>Cache<a href="#authorisationDataCache" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">authorisation<wbr/>Data<wbr/>Cache<span class="tsd-signature-symbol">:</span> <a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L15">src/GoogleAuthentifier.ts:15</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="credentials" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> credentials<a href="#credentials" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">credentials<span class="tsd-signature-symbol">?:</span> <a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</a></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="secret_key" class="tsd-anchor"></a><h3 class="tsd-anchor-link">secret_<wbr/>key<a href="#secret_key" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">secret_<wbr/>key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="signInUserUrlTemplate" class="tsd-anchor"></a><h3 class="tsd-anchor-link">sign<wbr/>In<wbr/>User<wbr/>Url<wbr/>Template<a href="#signInUserUrlTemplate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">sign<wbr/>In<wbr/>User<wbr/>Url<wbr/>Template<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=%(key)s'</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L9">src/GoogleAuthentifier.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="signUpUserUrlTemplate" class="tsd-anchor"></a><h3 class="tsd-anchor-link">sign<wbr/>Up<wbr/>User<wbr/>Url<wbr/>Template<a href="#signUpUserUrlTemplate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">sign<wbr/>Up<wbr/>User<wbr/>Url<wbr/>Template<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=%(key)s'</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L6">src/GoogleAuthentifier.ts:6</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="tokenRefreshUrlTemplate" class="tsd-anchor"></a><h3 class="tsd-anchor-link">token<wbr/>Refresh<wbr/>Url<wbr/>Template<a href="#tokenRefreshUrlTemplate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">token<wbr/>Refresh<wbr/>Url<wbr/>Template<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = 'https://securetoken.googleapis.com/v1/token?key=%(key)s'</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L12">src/GoogleAuthentifier.ts:12</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 id="buildSignInUserUrl" class="tsd-anchor"></a><h3 class="tsd-anchor-link">build<wbr/>Sign<wbr/>In<wbr/>User<wbr/>Url<a href="#buildSignInUserUrl" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">build<wbr/>Sign<wbr/>In<wbr/>User<wbr/>Url<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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L30">src/GoogleAuthentifier.ts:30</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="buildSignUpUserUrl" class="tsd-anchor"></a><h3 class="tsd-anchor-link">build<wbr/>Sign<wbr/>Up<wbr/>User<wbr/>Url<a href="#buildSignUpUserUrl" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">build<wbr/>Sign<wbr/>Up<wbr/>User<wbr/>Url<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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L22">src/GoogleAuthentifier.ts:22</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="buildTokenRefreshUrl" class="tsd-anchor"></a><h3 class="tsd-anchor-link">build<wbr/>Token<wbr/>Refresh<wbr/>Url<a href="#buildTokenRefreshUrl" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">build<wbr/>Token<wbr/>Refresh<wbr/>Url<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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L26">src/GoogleAuthentifier.ts:26</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="ensureCacheValidity" class="tsd-anchor"></a><h3 class="tsd-anchor-link">ensure<wbr/>Cache<wbr/>Validity<a href="#ensureCacheValidity" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">ensure<wbr/>Cache<wbr/>Validity<span class="tsd-signature-symbol">(</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="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L165">src/GoogleAuthentifier.ts:165</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Makes sure that the authorisation cache is valid</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">ensureCacheValidity</span><span class="hl-1">().</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</a><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="isCacheValid" class="tsd-anchor"></a><h3 class="tsd-anchor-link">is<wbr/>Cache<wbr/>Valid<a href="#isCacheValid" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">is<wbr/>Cache<wbr/>Valid<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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L188">src/GoogleAuthentifier.ts:188</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Test if the authorisation cache is valid</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">isCacheValid</span><span class="hl-1">().</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="obtainAuthorisationToken" class="tsd-anchor"></a><h3 class="tsd-anchor-link">obtain<wbr/>Authorisation<wbr/>Token<a href="#obtainAuthorisationToken" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">obtain<wbr/>Authorisation<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">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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L119">src/GoogleAuthentifier.ts:119</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Always obtain a valid authorisation token</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">obtainAuthorisationToken</span><span class="hl-1">().</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd></dl></div><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></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="refreshAuthorisationToken" class="tsd-anchor"></a><h3 class="tsd-anchor-link">refresh<wbr/>Authorisation<wbr/>Token<a href="#refreshAuthorisationToken" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">refresh<wbr/>Authorisation<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">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L131">src/GoogleAuthentifier.ts:131</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Refresh the current authorisation token</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">refreshAuthorisationToken</span><span class="hl-1">().</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</a><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="signIn" class="tsd-anchor"></a><h3 class="tsd-anchor-link">sign<wbr/>In<a href="#signIn" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">sign<wbr/>In<span class="tsd-signature-symbol">(</span>signInBody<span class="tsd-signature-symbol">?: </span><a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</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><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L78">src/GoogleAuthentifier.ts:78</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sign in</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><p>Sign in with instance credentials</p>
<pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">signIn</span><span class="hl-1">().</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd><dt>example</dt><dd><p>Sign in with new credentials</p>
<pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">signIn</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-0">email:</span><span class="hl-1"> </span><span class="hl-5">"my@mail.com"</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">password:</span><span class="hl-1"> </span><span class="hl-5">"myPassword"</span><br/><span class="hl-1"> }).</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>signInBody: <a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</a><span class="tsd-signature-symbol"> = ...</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</a><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="signUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link">sign<wbr/>Up<a href="#signUp" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">sign<wbr/>Up<span class="tsd-signature-symbol">(</span>signUpBody<span class="tsd-signature-symbol">?: </span><a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</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><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</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/leopoldhub/wombo-dream-api/blob/b1890d0/src/GoogleAuthentifier.ts#L49">src/GoogleAuthentifier.ts:49</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sign up a new user</p>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><p>Sign up as anonymous</p>
<pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">signUp</span><span class="hl-1">().</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd><dt>example</dt><dd><p>Sign up as new user</p>
<pre><code class="language-ts"><span class="hl-0">authentifierInstance</span><span class="hl-1">.</span><span class="hl-4">signUp</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-0">email:</span><span class="hl-1"> </span><span class="hl-5">"my@mail.com"</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">password:</span><span class="hl-1"> </span><span class="hl-5">"myPassword"</span><br/><span class="hl-1"> }).</span><span class="hl-4">then</span><span class="hl-1">(</span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">)</span>
</code></pre>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> signUpBody: <a href="../modules/Types.html#CredentialsBody" class="tsd-signature-type" data-tsd-kind="Type alias">CredentialsBody</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/Types.html#AuthorisationCache" class="tsd-signature-type" data-tsd-kind="Type alias">AuthorisationCache</a><span class="tsd-signature-symbol">></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=""><a href="../modules.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/_internal_.html"><internal></a></li><li class="current tsd-kind-namespace"><a href="../modules/GoogleAuthentifier.html">Google<wbr/>Authentifier</a></li><li class=" tsd-kind-namespace"><a href="../modules/Types.html">Types</a></li><li class=" tsd-kind-namespace"><a href="../modules/WomboDream.html">Wombo<wbr/>Dream</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-parent-kind-namespace"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html" class="tsd-kind-icon">Google<wbr/>Authentifier</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#authorisationDataCache" class="tsd-kind-icon">authorisation<wbr/>Data<wbr/>Cache</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#credentials" class="tsd-kind-icon">credentials</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#secret_key" class="tsd-kind-icon">secret_<wbr/>key</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signInUserUrlTemplate" class="tsd-kind-icon">sign<wbr/>In<wbr/>User<wbr/>Url<wbr/>Template</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signUpUserUrlTemplate" class="tsd-kind-icon">sign<wbr/>Up<wbr/>User<wbr/>Url<wbr/>Template</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#tokenRefreshUrlTemplate" class="tsd-kind-icon">token<wbr/>Refresh<wbr/>Url<wbr/>Template</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#buildSignInUserUrl" class="tsd-kind-icon">build<wbr/>Sign<wbr/>In<wbr/>User<wbr/>Url</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#buildSignUpUserUrl" class="tsd-kind-icon">build<wbr/>Sign<wbr/>Up<wbr/>User<wbr/>Url</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#buildTokenRefreshUrl" class="tsd-kind-icon">build<wbr/>Token<wbr/>Refresh<wbr/>Url</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#ensureCacheValidity" class="tsd-kind-icon">ensure<wbr/>Cache<wbr/>Validity</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#isCacheValid" class="tsd-kind-icon">is<wbr/>Cache<wbr/>Valid</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#obtainAuthorisationToken" class="tsd-kind-icon">obtain<wbr/>Authorisation<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#refreshAuthorisationToken" class="tsd-kind-icon">refresh<wbr/>Authorisation<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signIn" class="tsd-kind-icon">sign<wbr/>In</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="GoogleAuthentifier.GoogleAuthentifier-1.html#signUp" class="tsd-kind-icon">sign<wbr/>Up</a></li></ul></li></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-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></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>