Skip to content

Commit e334456

Browse files
committed
adding dev-v0.13.0 tag to this commit to ensure building
1 parent ccd10eb commit e334456

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4835
-4191
lines changed

html/supertokens_python/constants.html

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,10 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
3939
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
42-
SUPPORTED_CDI_VERSIONS = [
43-
&#34;2.9&#34;,
44-
&#34;2.10&#34;,
45-
&#34;2.11&#34;,
46-
&#34;2.12&#34;,
47-
&#34;2.13&#34;,
48-
&#34;2.14&#34;,
49-
&#34;2.15&#34;,
50-
&#34;2.16&#34;,
51-
&#34;2.17&#34;,
52-
&#34;2.18&#34;,
53-
&#34;2.19&#34;,
54-
&#34;2.20&#34;,
55-
]
56-
VERSION = &#34;0.12.9&#34;
42+
from __future__ import annotations
43+
44+
SUPPORTED_CDI_VERSIONS = [&#34;2.21&#34;]
45+
VERSION = &#34;0.13.0&#34;
5746
TELEMETRY = &#34;/telemetry&#34;
5847
USER_COUNT = &#34;/users/count&#34;
5948
USER_DELETE = &#34;/user/remove&#34;
@@ -66,7 +55,8 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
6655
FDI_KEY_HEADER = &#34;fdi-version&#34;
6756
API_VERSION = &#34;/apiversion&#34;
6857
API_VERSION_HEADER = &#34;cdi-version&#34;
69-
DASHBOARD_VERSION = &#34;0.6&#34;</code></pre>
58+
DASHBOARD_VERSION = &#34;0.6&#34;
59+
HUNDRED_YEARS_IN_MS = 3153600000000</code></pre>
7060
</details>
7161
</section>
7262
<section>

html/supertokens_python/querier.html

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,25 @@ <h1 class="title">Module <code>supertokens_python.querier</code></h1>
225225

226226
return await self.__send_request_helper(path, &#34;PUT&#34;, f, len(self.__hosts))
227227

228+
def get_all_core_urls_for_path(self, path: str) -&gt; List[str]:
229+
if self.__hosts is None:
230+
return []
231+
232+
normalized_path = NormalisedURLPath(path)
233+
234+
result: List[str] = []
235+
236+
for h in self.__hosts:
237+
current_domain = h.domain.get_as_string_dangerous()
238+
current_base_path = h.base_path.get_as_string_dangerous()
239+
240+
result.append(
241+
current_domain
242+
+ current_base_path
243+
+ normalized_path.get_as_string_dangerous()
244+
)
245+
return result
246+
228247
async def __send_request_helper(
229248
self,
230249
path: NormalisedURLPath,
@@ -459,6 +478,25 @@ <h2 class="section-title" id="header-classes">Classes</h2>
459478

460479
return await self.__send_request_helper(path, &#34;PUT&#34;, f, len(self.__hosts))
461480

481+
def get_all_core_urls_for_path(self, path: str) -&gt; List[str]:
482+
if self.__hosts is None:
483+
return []
484+
485+
normalized_path = NormalisedURLPath(path)
486+
487+
result: List[str] = []
488+
489+
for h in self.__hosts:
490+
current_domain = h.domain.get_as_string_dangerous()
491+
current_base_path = h.base_path.get_as_string_dangerous()
492+
493+
result.append(
494+
current_domain
495+
+ current_base_path
496+
+ normalized_path.get_as_string_dangerous()
497+
)
498+
return result
499+
462500
async def __send_request_helper(
463501
self,
464502
path: NormalisedURLPath,
@@ -593,6 +631,35 @@ <h3>Static methods</h3>
593631
</dl>
594632
<h3>Methods</h3>
595633
<dl>
634+
<dt id="supertokens_python.querier.Querier.get_all_core_urls_for_path"><code class="name flex">
635+
<span>def <span class="ident">get_all_core_urls_for_path</span></span>(<span>self, path: str) ‑> List[str]</span>
636+
</code></dt>
637+
<dd>
638+
<div class="desc"></div>
639+
<details class="source">
640+
<summary>
641+
<span>Expand source code</span>
642+
</summary>
643+
<pre><code class="python">def get_all_core_urls_for_path(self, path: str) -&gt; List[str]:
644+
if self.__hosts is None:
645+
return []
646+
647+
normalized_path = NormalisedURLPath(path)
648+
649+
result: List[str] = []
650+
651+
for h in self.__hosts:
652+
current_domain = h.domain.get_as_string_dangerous()
653+
current_base_path = h.base_path.get_as_string_dangerous()
654+
655+
result.append(
656+
current_domain
657+
+ current_base_path
658+
+ normalized_path.get_as_string_dangerous()
659+
)
660+
return result</code></pre>
661+
</details>
662+
</dd>
596663
<dt id="supertokens_python.querier.Querier.get_api_version"><code class="name flex">
597664
<span>async def <span class="ident">get_api_version</span></span>(<span>self)</span>
598665
</code></dt>
@@ -767,6 +834,7 @@ <h2>Index</h2>
767834
<li>
768835
<h4><code><a title="supertokens_python.querier.Querier" href="#supertokens_python.querier.Querier">Querier</a></code></h4>
769836
<ul class="">
837+
<li><code><a title="supertokens_python.querier.Querier.get_all_core_urls_for_path" href="#supertokens_python.querier.Querier.get_all_core_urls_for_path">get_all_core_urls_for_path</a></code></li>
770838
<li><code><a title="supertokens_python.querier.Querier.get_api_version" href="#supertokens_python.querier.Querier.get_api_version">get_api_version</a></code></li>
771839
<li><code><a title="supertokens_python.querier.Querier.get_hosts_alive_for_testing" href="#supertokens_python.querier.Querier.get_hosts_alive_for_testing">get_hosts_alive_for_testing</a></code></li>
772840
<li><code><a title="supertokens_python.querier.Querier.get_instance" href="#supertokens_python.querier.Querier.get_instance">get_instance</a></code></li>

html/supertokens_python/recipe/dashboard/interfaces.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ <h1 class="title">Module <code>supertokens_python.recipe.dashboard.interfaces</c
6060
def __init__(self, info: SessionInformationResult) -&gt; None:
6161
self.session_handle = info.session_handle
6262
self.user_id = info.user_id
63-
self.session_data = info.session_data
63+
self.session_data_in_database = info.session_data_in_database
6464
self.expiry = info.expiry
65-
self.access_token_payload = info.access_token_payload
65+
self.access_token_payload = info.custom_claims_in_access_token_payload
6666
self.time_created = info.time_created
6767

6868

@@ -193,7 +193,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.dashboard.interfaces</c
193193
{
194194
&#34;accessTokenPayload&#34;: s.access_token_payload,
195195
&#34;expiry&#34;: s.expiry,
196-
&#34;sessionData&#34;: s.session_data,
196+
&#34;sessionDataInDatabase&#34;: s.session_data_in_database,
197197
&#34;status&#34;: &#34;OK&#34;,
198198
&#34;timeCreated&#34;: s.time_created,
199199
&#34;userId&#34;: s.user_id,
@@ -691,9 +691,9 @@ <h3>Methods</h3>
691691
def __init__(self, info: SessionInformationResult) -&gt; None:
692692
self.session_handle = info.session_handle
693693
self.user_id = info.user_id
694-
self.session_data = info.session_data
694+
self.session_data_in_database = info.session_data_in_database
695695
self.expiry = info.expiry
696-
self.access_token_payload = info.access_token_payload
696+
self.access_token_payload = info.custom_claims_in_access_token_payload
697697
self.time_created = info.time_created</code></pre>
698698
</details>
699699
</dd>
@@ -1608,7 +1608,7 @@ <h3>Methods</h3>
16081608
{
16091609
&#34;accessTokenPayload&#34;: s.access_token_payload,
16101610
&#34;expiry&#34;: s.expiry,
1611-
&#34;sessionData&#34;: s.session_data,
1611+
&#34;sessionDataInDatabase&#34;: s.session_data_in_database,
16121612
&#34;status&#34;: &#34;OK&#34;,
16131613
&#34;timeCreated&#34;: s.time_created,
16141614
&#34;userId&#34;: s.user_id,

html/supertokens_python/recipe/emailpassword/api/implementation.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.api.imple
199199
session = await create_new_session(
200200
api_options.request,
201201
user.user_id,
202+
access_token_payload={},
203+
session_data_in_database={},
202204
user_context=user_context,
203205
)
204206
return SignInPostOkResult(user, session)
@@ -236,6 +238,8 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.api.imple
236238
session = await create_new_session(
237239
api_options.request,
238240
user.user_id,
241+
access_token_payload={},
242+
session_data_in_database={},
239243
user_context=user_context,
240244
)
241245
return SignUpPostOkResult(user, session)</code></pre>
@@ -381,6 +385,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
381385
session = await create_new_session(
382386
api_options.request,
383387
user.user_id,
388+
access_token_payload={},
389+
session_data_in_database={},
384390
user_context=user_context,
385391
)
386392
return SignInPostOkResult(user, session)
@@ -418,6 +424,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
418424
session = await create_new_session(
419425
api_options.request,
420426
user.user_id,
427+
access_token_payload={},
428+
session_data_in_database={},
421429
user_context=user_context,
422430
)
423431
return SignUpPostOkResult(user, session)</code></pre>
@@ -588,6 +596,8 @@ <h3>Methods</h3>
588596
session = await create_new_session(
589597
api_options.request,
590598
user.user_id,
599+
access_token_payload={},
600+
session_data_in_database={},
591601
user_context=user_context,
592602
)
593603
return SignInPostOkResult(user, session)</code></pre>
@@ -635,6 +645,8 @@ <h3>Methods</h3>
635645
session = await create_new_session(
636646
api_options.request,
637647
user.user_id,
648+
access_token_payload={},
649+
session_data_in_database={},
638650
user_context=user_context,
639651
)
640652
return SignUpPostOkResult(user, session)</code></pre>

html/supertokens_python/recipe/emailpassword/asyncio/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.asyncio</
5050
user_id: str,
5151
email: Union[str, None] = None,
5252
password: Union[str, None] = None,
53+
apply_password_policy: Union[bool, None] = None,
5354
user_context: Union[None, Dict[str, Any]] = None,
5455
):
5556
if user_context is None:
5657
user_context = {}
5758
return await EmailPasswordRecipe.get_instance().recipe_implementation.update_email_or_password(
58-
user_id, email, password, user_context
59+
user_id, email, password, apply_password_policy, user_context
5960
)
6061

6162

@@ -274,7 +275,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
274275
</details>
275276
</dd>
276277
<dt id="supertokens_python.recipe.emailpassword.asyncio.update_email_or_password"><code class="name flex">
277-
<span>async def <span class="ident">update_email_or_password</span></span>(<span>user_id: str, email: Optional[str] = None, password: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None)</span>
278+
<span>async def <span class="ident">update_email_or_password</span></span>(<span>user_id: str, email: Optional[str] = None, password: Optional[str] = None, apply_password_policy: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None)</span>
278279
</code></dt>
279280
<dd>
280281
<div class="desc"></div>
@@ -286,12 +287,13 @@ <h2 class="section-title" id="header-functions">Functions</h2>
286287
user_id: str,
287288
email: Union[str, None] = None,
288289
password: Union[str, None] = None,
290+
apply_password_policy: Union[bool, None] = None,
289291
user_context: Union[None, Dict[str, Any]] = None,
290292
):
291293
if user_context is None:
292294
user_context = {}
293295
return await EmailPasswordRecipe.get_instance().recipe_implementation.update_email_or_password(
294-
user_id, email, password, user_context
296+
user_id, email, password, apply_password_policy, user_context
295297
)</code></pre>
296298
</details>
297299
</dd>

html/supertokens_python/recipe/emailpassword/interfaces.html

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.interface
106106
pass
107107

108108

109+
class UpdateEmailOrPasswordPasswordPolicyViolationError:
110+
failure_reason: str
111+
112+
def __init__(self, failure_reason: str):
113+
self.failure_reason = failure_reason
114+
115+
109116
class RecipeInterface(ABC):
110117
def __init__(self):
111118
pass
@@ -154,11 +161,13 @@ <h1 class="title">Module <code>supertokens_python.recipe.emailpassword.interface
154161
user_id: str,
155162
email: Union[str, None],
156163
password: Union[str, None],
164+
apply_password_policy: Union[bool, None],
157165
user_context: Dict[str, Any],
158166
) -&gt; Union[
159167
UpdateEmailOrPasswordOkResult,
160168
UpdateEmailOrPasswordEmailAlreadyExistsError,
161169
UpdateEmailOrPasswordUnknownUserIdError,
170+
UpdateEmailOrPasswordPasswordPolicyViolationError,
162171
]:
163172
pass
164173

@@ -817,11 +826,13 @@ <h3>Methods</h3>
817826
user_id: str,
818827
email: Union[str, None],
819828
password: Union[str, None],
829+
apply_password_policy: Union[bool, None],
820830
user_context: Dict[str, Any],
821831
) -&gt; Union[
822832
UpdateEmailOrPasswordOkResult,
823833
UpdateEmailOrPasswordEmailAlreadyExistsError,
824834
UpdateEmailOrPasswordUnknownUserIdError,
835+
UpdateEmailOrPasswordPasswordPolicyViolationError,
825836
]:
826837
pass</code></pre>
827838
</details>
@@ -935,7 +946,7 @@ <h3>Methods</h3>
935946
</details>
936947
</dd>
937948
<dt id="supertokens_python.recipe.emailpassword.interfaces.RecipeInterface.update_email_or_password"><code class="name flex">
938-
<span>async def <span class="ident">update_email_or_password</span></span>(<span>self, user_id: str, email: Union[str, None], password: Union[str, None], user_context: Dict[str, Any]) ‑> Union[<a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordOkResult" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordOkResult">UpdateEmailOrPasswordOkResult</a><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordEmailAlreadyExistsError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordEmailAlreadyExistsError">UpdateEmailOrPasswordEmailAlreadyExistsError</a><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError">UpdateEmailOrPasswordUnknownUserIdError</a>]</span>
949+
<span>async def <span class="ident">update_email_or_password</span></span>(<span>self, user_id: str, email: Union[str, None], password: Union[str, None], apply_password_policy: Union[bool, None], user_context: Dict[str, Any]) ‑> Union[<a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordOkResult" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordOkResult">UpdateEmailOrPasswordOkResult</a><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordEmailAlreadyExistsError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordEmailAlreadyExistsError">UpdateEmailOrPasswordEmailAlreadyExistsError</a><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError">UpdateEmailOrPasswordUnknownUserIdError</a><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError">UpdateEmailOrPasswordPasswordPolicyViolationError</a>]</span>
939950
</code></dt>
940951
<dd>
941952
<div class="desc"></div>
@@ -949,11 +960,13 @@ <h3>Methods</h3>
949960
user_id: str,
950961
email: Union[str, None],
951962
password: Union[str, None],
963+
apply_password_policy: Union[bool, None],
952964
user_context: Dict[str, Any],
953965
) -&gt; Union[
954966
UpdateEmailOrPasswordOkResult,
955967
UpdateEmailOrPasswordEmailAlreadyExistsError,
956968
UpdateEmailOrPasswordUnknownUserIdError,
969+
UpdateEmailOrPasswordPasswordPolicyViolationError,
957970
]:
958971
pass</code></pre>
959972
</details>
@@ -1288,6 +1301,30 @@ <h3>Methods</h3>
12881301
pass</code></pre>
12891302
</details>
12901303
</dd>
1304+
<dt id="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError"><code class="flex name class">
1305+
<span>class <span class="ident">UpdateEmailOrPasswordPasswordPolicyViolationError</span></span>
1306+
<span>(</span><span>failure_reason: str)</span>
1307+
</code></dt>
1308+
<dd>
1309+
<div class="desc"></div>
1310+
<details class="source">
1311+
<summary>
1312+
<span>Expand source code</span>
1313+
</summary>
1314+
<pre><code class="python">class UpdateEmailOrPasswordPasswordPolicyViolationError:
1315+
failure_reason: str
1316+
1317+
def __init__(self, failure_reason: str):
1318+
self.failure_reason = failure_reason</code></pre>
1319+
</details>
1320+
<h3>Class variables</h3>
1321+
<dl>
1322+
<dt id="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError.failure_reason"><code class="name">var <span class="ident">failure_reason</span> : str</code></dt>
1323+
<dd>
1324+
<div class="desc"></div>
1325+
</dd>
1326+
</dl>
1327+
</dd>
12911328
<dt id="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError"><code class="flex name class">
12921329
<span>class <span class="ident">UpdateEmailOrPasswordUnknownUserIdError</span></span>
12931330
</code></dt>
@@ -1429,6 +1466,12 @@ <h4><code><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEma
14291466
<h4><code><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordOkResult" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordOkResult">UpdateEmailOrPasswordOkResult</a></code></h4>
14301467
</li>
14311468
<li>
1469+
<h4><code><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError">UpdateEmailOrPasswordPasswordPolicyViolationError</a></code></h4>
1470+
<ul class="">
1471+
<li><code><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError.failure_reason" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordPasswordPolicyViolationError.failure_reason">failure_reason</a></code></li>
1472+
</ul>
1473+
</li>
1474+
<li>
14321475
<h4><code><a title="supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError" href="#supertokens_python.recipe.emailpassword.interfaces.UpdateEmailOrPasswordUnknownUserIdError">UpdateEmailOrPasswordUnknownUserIdError</a></code></h4>
14331476
</li>
14341477
</ul>

0 commit comments

Comments
 (0)