Debian Codegraph @

src/globus_sdk/testing/data/auth/get_client.py

raw
1 import uuid
2
3 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
4
5 FQDN = "globus.org"
6
7 CLIENT = {
8 "required_idp": None,
9 "name": "Great client of FOO",
10 "redirect_uris": [],
11 "links": {"privacy_policy": None, "terms_and_conditions": None},
12 "scopes": [],
13 "grant_types": ["authorization_code", "client_credentials", "refresh_token"],
14 "id": str(uuid.uuid1()),
15 "prompt_for_named_grant": False,
16 "fqdns": [FQDN],
17 "project": "da84e531-1afb-43cb-8c87-135ab580516a",
18 "client_type": "client_identity",
19 "visibility": "private",
20 "parent_client": None,
21 "userinfo_from_effective_identity": True,
22 "preselect_idp": None,
23 "public_client": False,
24 }
25
26 RESPONSES = ResponseSet(
27 default=RegisteredResponse(
28 service="auth",
29 path=f"/v2/api/clients/{CLIENT['id']}",
30 json={"client": CLIENT},
31 metadata={
32 "client_id": CLIENT["id"],
33 },
34 ),
35 fqdn=RegisteredResponse(
36 service="auth",
37 path="/v2/api/clients",
38 json={"client": CLIENT},
39 metadata={
40 "client_id": CLIENT["id"],
41 "fqdn": FQDN,
42 },
43 ),
44 )