Debian Codegraph @

src/globus_sdk/services/auth/data.py

raw
1 from __future__ import annotations
2
3 import uuid
4
5 from globus_sdk._payload import GlobusPayload
6
7
8 class DependentScopeSpec(GlobusPayload):
9 """
10 Utility class for creating dependent scope values as parameters to
11 :meth:`AuthClient.create_scope <globus_sdk.AuthClient.create_scope>`
12 and
13 :meth:`AuthClient.update_scope <globus_sdk.AuthClient.update_scope>`.
14
15 :param scope: The ID of the dependent scope
16 :param optional: Whether or not the user can decline this specific scope without
17 declining the whole consent.
18 :param requires_refresh_token: Whether or not the dependency requires a refresh
19 token.
20 """
21
22 def __init__(
23 self,
24 scope: uuid.UUID | str,
25 optional: bool,
26 requires_refresh_token: bool,
27 ) -> None:
28 super().__init__()
29 self["scope"] = str(scope)
30 self["optional"] = optional
31 self["requires_refresh_token"] = requires_refresh_token