fractal-server 2.18.3__py3-none-any.whl → 2.18.3a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __VERSION__ = "2.18.3"
1
+ __VERSION__ = "2.18.3a1"
@@ -3,8 +3,6 @@ from httpx_oauth.clients.github import GitHubOAuth2
3
3
  from httpx_oauth.clients.google import GoogleOAuth2
4
4
  from httpx_oauth.clients.openid import OpenID
5
5
  from httpx_oauth.clients.openid import OpenIDConfigurationError
6
- from httpx_oauth.exceptions import GetIdEmailError
7
- from httpx_oauth.exceptions import GetProfileError
8
6
 
9
7
  from fractal_server.config import OAuthSettings
10
8
  from fractal_server.config import get_oauth_settings
@@ -15,29 +13,6 @@ from . import cookie_backend
15
13
  from . import fastapi_users
16
14
 
17
15
 
18
- class FractalOpenID(OpenID):
19
- """
20
- Subclass of `httpx_oauth.clients.openid.OpenID` with customizable name for
21
- the `"email"` claim.
22
- """
23
-
24
- def __init__(self, *, email_claim: str, **kwargs):
25
- super().__init__(**kwargs)
26
- self.email_claim = email_claim
27
-
28
- # TODO-requires-py312: add `@override` decorator
29
- async def get_id_email(self, token: str) -> tuple[str, str | None]:
30
- """
31
- Identical to the parent-class method (httpx-oauth version 0.16.1),
32
- apart from making `"email"` configurable.
33
- """
34
- try:
35
- profile = await self.get_profile(token)
36
- except GetProfileError as e:
37
- raise GetIdEmailError(response=e.response) from e
38
- return str(profile["sub"]), profile.get(self.email_claim)
39
-
40
-
41
16
  def _create_client_github(cfg: OAuthSettings) -> GitHubOAuth2:
42
17
  return GitHubOAuth2(
43
18
  client_id=cfg.OAUTH_CLIENT_ID.get_secret_value(),
@@ -54,11 +29,10 @@ def _create_client_google(cfg: OAuthSettings) -> GoogleOAuth2:
54
29
 
55
30
  def _create_client_oidc(cfg: OAuthSettings) -> OpenID:
56
31
  try:
57
- open_id = FractalOpenID(
32
+ open_id = OpenID(
58
33
  client_id=cfg.OAUTH_CLIENT_ID.get_secret_value(),
59
34
  client_secret=cfg.OAUTH_CLIENT_SECRET.get_secret_value(),
60
35
  openid_configuration_endpoint=cfg.OAUTH_OIDC_CONFIG_ENDPOINT.get_secret_value(), # noqa
61
- email_claim=cfg.OAUTH_EMAIL_CLAIM,
62
36
  )
63
37
  except OpenIDConfigurationError as e:
64
38
  OAUTH_OIDC_CONFIG_ENDPOINT = (
@@ -28,11 +28,6 @@ class OAuthSettings(BaseSettings):
28
28
  String to be used as `redirect_url` argument in
29
29
  `fastapi_users.get_oauth_router`, and then in
30
30
  `httpx_oauth.integrations.fastapi.OAuth2AuthorizeCallback`.
31
- OAUTH_EMAIL_CLAIM:
32
- Name of the OIDC claim with the user's email address. This is
33
- `"email"` by default, but can be customized (e.g. to `"mail"`) to
34
- fit with the response from the userinfo endpoint - see
35
- https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse
36
31
  """
37
32
 
38
33
  model_config = SettingsConfigDict(**SETTINGS_CONFIG_DICT)
@@ -48,7 +43,6 @@ class OAuthSettings(BaseSettings):
48
43
  OAUTH_CLIENT_SECRET: SecretStr | None = None
49
44
  OAUTH_OIDC_CONFIG_ENDPOINT: SecretStr | None = None
50
45
  OAUTH_REDIRECT_URL: str | None = None
51
- OAUTH_EMAIL_CLAIM: str = "email"
52
46
 
53
47
  @model_validator(mode="after")
54
48
  def check_configuration(self: Self) -> Self:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fractal-server
3
- Version: 2.18.3
3
+ Version: 2.18.3a1
4
4
  Summary: Backend component of the Fractal analytics platform
5
5
  Author: Tommaso Comparin, Marco Franzon, Yuri Chiucconi, Jacopo Nespolo
6
6
  Author-email: Tommaso Comparin <tommaso.comparin@exact-lab.it>, Marco Franzon <marco.franzon@exact-lab.it>, Yuri Chiucconi <yuri.chiucconi@exact-lab.it>, Jacopo Nespolo <jacopo.nespolo@exact-lab.it>
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=OVKju0ZnOyFmUq3SkcNUvcXZUQHwNj9NAn3ucligbaw,23
1
+ fractal_server/__init__.py,sha256=2-J9RpG_KXCtJNi4kxk3w5ETlw28IsXy-07Hns9oc6A,25
2
2
  fractal_server/__main__.py,sha256=QeKoAgqoiozLJDa8kSVe-Aso1WWgrk1yLUYWS8RxZVM,11405
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -65,7 +65,7 @@ fractal_server/app/routes/auth/_aux_auth.py,sha256=gKdYTWUzxcU44Iep787zReWwdAs4k
65
65
  fractal_server/app/routes/auth/current_user.py,sha256=uDWttWo9isG69Jv1EGnnr2Ki5ZGd0D76jgjVDQMkn8c,3251
66
66
  fractal_server/app/routes/auth/group.py,sha256=uR98vdQHH-7BFl-Czj85ESPxT2yQymy4qtagaMrnUPU,6491
67
67
  fractal_server/app/routes/auth/login.py,sha256=buVa5Y8T0cd_SW1CqC-zMv-3SfPxGJknf7MYlUyKOl0,567
68
- fractal_server/app/routes/auth/oauth.py,sha256=ocQjyy6OfuEORDYVVzQSgcisSwL-YLZxacq7FuzwJF4,3673
68
+ fractal_server/app/routes/auth/oauth.py,sha256=NxrwOWBGPe7hLPEnD66nfWPGMWzDM80LIrwtmONVw-4,2731
69
69
  fractal_server/app/routes/auth/register.py,sha256=IiUJhgY0ZrTs0RlBRRjoTv4wF5Gb3eXTInFV-dXkpsE,615
70
70
  fractal_server/app/routes/auth/router.py,sha256=Zip_fw9qJWtoXWjluznschyrCKb2n_rf3xWarSXMkgI,692
71
71
  fractal_server/app/routes/auth/users.py,sha256=5BagdH1dz-ZoXdvTgIo9QWBNFPW3p1pIZfY9BBu4eds,7397
@@ -103,7 +103,7 @@ fractal_server/config/_data.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
103
103
  fractal_server/config/_database.py,sha256=0_FvboMkQEKKRxvr9uFdp98oiQwMTFbdCW3loTZNSY0,1846
104
104
  fractal_server/config/_email.py,sha256=vMwLHN9-beYp_-up-WkTpeyNUZk4EHwt3N2l6-PYnx4,4364
105
105
  fractal_server/config/_main.py,sha256=6splUmAPRD1J9HXkeZ-Vqif7Nw4ljJXIugpvRrcwPeI,2476
106
- fractal_server/config/_oauth.py,sha256=kktD0MEZ_NV4QOK6RmOXDK1x8RCrFEkqC6WLY-DzRIY,2390
106
+ fractal_server/config/_oauth.py,sha256=UTmlFppDZcOQhr3RvkiG5XMqvr54XRAQ_Y-iR0V8N-8,2024
107
107
  fractal_server/config/_settings_config.py,sha256=tsyXQOnn9QKCFJD6hRo_dJXlQQyl70DbqgHMJoZ1xnY,144
108
108
  fractal_server/data_migrations/tools.py,sha256=LeMeASwYGtEqd-3wOLle6WARdTGAimoyMmRbbJl-hAM,572
109
109
  fractal_server/exceptions.py,sha256=l6aZDk_6u_9PwDaQSoIFdI40ekpzqOJaxjx5rhW-HVI,141
@@ -267,7 +267,7 @@ fractal_server/types/validators/_workflow_task_arguments_validators.py,sha256=zt
267
267
  fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
268
268
  fractal_server/utils.py,sha256=-rjg8QTXQcKweXjn0NcmETFs1_uM9PGnbl0Q7c4ERPM,2181
269
269
  fractal_server/zip_tools.py,sha256=Uhn-ax4_9g1PJ32BdyaX30hFpAeVOv2tZYTUK-zVn1E,5719
270
- fractal_server-2.18.3.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
271
- fractal_server-2.18.3.dist-info/entry_points.txt,sha256=3TpdcjmETRYWJxFyAh3z-9955EWua9jdkSnBwxES1uE,60
272
- fractal_server-2.18.3.dist-info/METADATA,sha256=-sxLSpyU_KH3v5FE9LChgUo9IR99hQNrJrxdnof6jpA,4161
273
- fractal_server-2.18.3.dist-info/RECORD,,
270
+ fractal_server-2.18.3a1.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
271
+ fractal_server-2.18.3a1.dist-info/entry_points.txt,sha256=3TpdcjmETRYWJxFyAh3z-9955EWua9jdkSnBwxES1uE,60
272
+ fractal_server-2.18.3a1.dist-info/METADATA,sha256=dowEZiXk1xYXEsowmAdTx54gIWNNZ6w8PJYuvUczzdA,4163
273
+ fractal_server-2.18.3a1.dist-info/RECORD,,