Skip to content

Commit 5b8c416

Browse files
committed
adding dev-v0.28.0 tag to this commit to ensure building
1 parent ec0b729 commit 5b8c416

File tree

244 files changed

+1117
-939
lines changed

Some content is hidden

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

244 files changed

+1117
-939
lines changed

html/supertokens_python/async_to_sync_wrapper.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ <h1 class="title">Module <code>supertokens_python.async_to_sync_wrapper</code></
4141
# under the License.
4242

4343
import asyncio
44-
from typing import Any, Coroutine, TypeVar
4544
from os import getenv
45+
from typing import Any, Coroutine, TypeVar
4646

4747
_T = TypeVar(&#34;_T&#34;)
4848

html/supertokens_python/asyncio/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h1 class="title">Module <code>supertokens_python.asyncio</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-
from typing import Dict, List, Optional, Union, Any
42+
from typing import Any, Dict, List, Optional, Union
4343

4444
from supertokens_python import Supertokens
4545
from supertokens_python.interfaces import (
@@ -52,8 +52,8 @@ <h1 class="title">Module <code>supertokens_python.asyncio</code></h1>
5252
UserIdMappingAlreadyExistsError,
5353
UserIDTypes,
5454
)
55-
from supertokens_python.recipe.accountlinking.recipe import AccountLinkingRecipe
5655
from supertokens_python.recipe.accountlinking.interfaces import GetUsersResult
56+
from supertokens_python.recipe.accountlinking.recipe import AccountLinkingRecipe
5757
from supertokens_python.types import AccountInfo, User
5858

5959

html/supertokens_python/auth_utils.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ <h1 class="title">Module <code>supertokens_python.auth_utils</code></h1>
2626
<summary>
2727
<span>Expand source code</span>
2828
</summary>
29-
<pre><code class="python">from typing import Awaitable, Callable, Dict, Any, Optional, Union, List
29+
<pre><code class="python">from typing import Any, Awaitable, Callable, Dict, List, Optional, Union
30+
3031
from typing_extensions import Literal
32+
33+
from supertokens_python.exceptions import BadInputError, raise_bad_input_exception
3134
from supertokens_python.framework import BaseRequest
3235
from supertokens_python.recipe.accountlinking import (
3336
AccountInfoWithRecipeIdAndUserId,
@@ -39,6 +42,9 @@ <h1 class="title">Module <code>supertokens_python.auth_utils</code></h1>
3942
from supertokens_python.recipe.accountlinking.utils import (
4043
recipe_init_defined_should_do_automatic_account_linking,
4144
)
45+
from supertokens_python.recipe.emailverification import (
46+
EmailVerificationClaim,
47+
)
4248
from supertokens_python.recipe.multifactorauth.asyncio import (
4349
mark_factor_as_complete_in_session,
4450
)
@@ -48,23 +54,18 @@ <h1 class="title">Module <code>supertokens_python.auth_utils</code></h1>
4854
update_and_get_mfa_related_info_in_session,
4955
)
5056
from supertokens_python.recipe.multitenancy.asyncio import associate_user_to_tenant
51-
from supertokens_python.recipe.session.interfaces import SessionContainer
5257
from supertokens_python.recipe.session.asyncio import create_new_session, get_session
58+
from supertokens_python.recipe.session.exceptions import UnauthorisedError
59+
from supertokens_python.recipe.session.interfaces import SessionContainer
5360
from supertokens_python.recipe.thirdparty.types import ThirdPartyInfo
5461
from supertokens_python.types import (
5562
AccountInfo,
56-
User,
5763
LoginMethod,
58-
)
59-
from supertokens_python.types import (
6064
RecipeUserId,
65+
User,
6166
)
62-
from supertokens_python.recipe.session.exceptions import UnauthorisedError
63-
from supertokens_python.recipe.emailverification import (
64-
EmailVerificationClaim,
65-
)
66-
from supertokens_python.exceptions import BadInputError, raise_bad_input_exception
6767
from supertokens_python.utils import log_debug_message
68+
6869
from .asyncio import get_user
6970

7071

@@ -953,7 +954,6 @@ <h1 class="title">Module <code>supertokens_python.auth_utils</code></h1>
953954
async def get_mfa_requirements_for_auth():
954955
nonlocal mfa_info_prom
955956
if mfa_info_prom is None:
956-
957957
mfa_info_prom = await update_and_get_mfa_related_info_in_session(
958958
input_session=session,
959959
user_context=user_context,
@@ -1021,7 +1021,6 @@ <h1 class="title">Module <code>supertokens_python.auth_utils</code></h1>
10211021
should_try_linking_with_session_user: Optional[bool],
10221022
user_context: Dict[str, Any],
10231023
) -&gt; Optional[SessionContainer]:
1024-
10251024
if should_try_linking_with_session_user is not False:
10261025
return await get_session(
10271026
request,

html/supertokens_python/constants.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
4343
from __future__ import annotations
4444

4545
SUPPORTED_CDI_VERSIONS = [&#34;5.2&#34;]
46-
VERSION = &#34;0.27.0&#34;
46+
VERSION = &#34;0.28.0&#34;
4747
TELEMETRY = &#34;/telemetry&#34;
4848
USER_COUNT = &#34;/users/count&#34;
4949
USER_DELETE = &#34;/user/remove&#34;

html/supertokens_python/exceptions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h1 class="title">Module <code>supertokens_python.exceptions</code></h1>
4141
# under the License.
4242
from __future__ import annotations
4343

44-
from typing import Union, NoReturn
44+
from typing import NoReturn, Union
4545

4646

4747
def raise_general_exception(

html/supertokens_python/framework/django/django_middleware.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ <h1 class="title">Module <code>supertokens_python.framework.django.django_middle
5050

5151

5252
def middleware(get_response: Any):
53+
from django.http import HttpRequest
54+
5355
from supertokens_python import Supertokens
5456
from supertokens_python.exceptions import SuperTokensError
5557
from supertokens_python.framework.django.django_request import DjangoRequest
5658
from supertokens_python.framework.django.django_response import DjangoResponse
5759
from supertokens_python.recipe.session import SessionContainer
5860
from supertokens_python.supertokens import manage_session_post_response
59-
60-
from django.http import HttpRequest
6161
from supertokens_python.utils import default_user_context
6262

6363
if asyncio.iscoroutinefunction(get_response):
@@ -76,10 +76,13 @@ <h1 class="title">Module <code>supertokens_python.framework.django.django_middle
7676
result = await get_response(request)
7777
result = DjangoResponse(result)
7878
if hasattr(request, &#34;supertokens&#34;) and isinstance(
79-
request.supertokens, SessionContainer # type: ignore
79+
request.supertokens, # type: ignore
80+
SessionContainer,
8081
):
8182
manage_session_post_response(
82-
request.supertokens, result, user_context # type: ignore
83+
request.supertokens, # type: ignore
84+
result,
85+
user_context,
8386
)
8487
if isinstance(result, DjangoResponse):
8588
return result.response
@@ -115,10 +118,13 @@ <h1 class="title">Module <code>supertokens_python.framework.django.django_middle
115118
raise Exception(&#34;should never happen&#34;)
116119

117120
if hasattr(request, &#34;supertokens&#34;) and isinstance(
118-
request.supertokens, SessionContainer # type: ignore
121+
request.supertokens, # type: ignore
122+
SessionContainer,
119123
):
120124
manage_session_post_response(
121-
request.supertokens, result, user_context # type: ignore
125+
request.supertokens, # type: ignore
126+
result,
127+
user_context,
122128
)
123129

124130
return result.response

html/supertokens_python/framework/django/django_request.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ <h1 class="title">Module <code>supertokens_python.framework.django.django_reques
4848
from supertokens_python.framework.request import BaseRequest
4949

5050
if TYPE_CHECKING:
51-
from supertokens_python.recipe.session.interfaces import SessionContainer
5251
from django.http import HttpRequest
5352

53+
from supertokens_python.recipe.session.interfaces import SessionContainer
54+
5455

5556
class DjangoRequest(BaseRequest):
5657
def __init__(self, request: HttpRequest):

html/supertokens_python/framework/django/django_response.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ <h1 class="title">Module <code>supertokens_python.framework.django.django_respon
7979
key=key,
8080
value=value,
8181
expires=datetime.fromtimestamp(ceil(expires / 1000)).strftime(
82-
&#34;%a, %d %b %Y %H:%M:%S GMT&#34;
82+
&#34;%a, %d %b %Y %H:%M:%S UTC&#34;
8383
),
8484
path=path,
8585
domain=domain,
@@ -177,7 +177,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
177177
key=key,
178178
value=value,
179179
expires=datetime.fromtimestamp(ceil(expires / 1000)).strftime(
180-
&#34;%a, %d %b %Y %H:%M:%S GMT&#34;
180+
&#34;%a, %d %b %Y %H:%M:%S UTC&#34;
181181
),
182182
path=path,
183183
domain=domain,

html/supertokens_python/framework/django/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h1 class="title">Module <code>supertokens_python.framework.django</code></h1>
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
4242
from supertokens_python.framework.django.django_middleware import (
43-
middleware, # type: ignore
43+
middleware as middleware,
4444
)</code></pre>
4545
</details>
4646
</section>

html/supertokens_python/framework/fastapi/fastapi_middleware.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,22 @@ <h1 class="title">Module <code>supertokens_python.framework.fastapi.fastapi_midd
4343

4444

4545
def get_middleware():
46-
from supertokens_python import Supertokens
47-
from supertokens_python.utils import default_user_context
48-
from supertokens_python.exceptions import SuperTokensError
49-
from supertokens_python.framework import BaseResponse
50-
from supertokens_python.recipe.session import SessionContainer
51-
from supertokens_python.supertokens import manage_session_post_response
52-
5346
from starlette.requests import Request
5447
from starlette.responses import Response
5548
from starlette.types import ASGIApp, Message, Receive, Scope, Send
5649

50+
from supertokens_python import Supertokens
51+
from supertokens_python.exceptions import SuperTokensError
52+
from supertokens_python.framework import BaseResponse
5753
from supertokens_python.framework.fastapi.fastapi_request import (
5854
FastApiRequest,
5955
)
6056
from supertokens_python.framework.fastapi.fastapi_response import (
6157
FastApiResponse,
6258
)
59+
from supertokens_python.recipe.session import SessionContainer
60+
from supertokens_python.supertokens import manage_session_post_response
61+
from supertokens_python.utils import default_user_context
6362

6463
class ASGIMiddleware:
6564
def __init__(self, app: ASGIApp) -&gt; None:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy