Debian Codegraph @

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

raw
1 import uuid
2
3 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
4
5 _kingfish = {
6 "username": "[email protected]",
7 "name": "Christone Ingram",
8 "id": str(uuid.uuid1()),
9 "email": "[email protected]",
10 }
11 _client_id = str(uuid.uuid1())
12 _scope = "urn:globus:auth:scope:auth.globus.org:view_identity_set profile email openid"
13
14
15 RESPONSES = ResponseSet(
16 default=RegisteredResponse(
17 service="auth",
18 path="/v2/oauth2/token/introspect",
19 method="POST",
20 json={
21 "active": True,
22 "token_type": "Bearer",
23 "scope": _scope,
24 "client_id": _client_id,
25 "username": _kingfish["username"],
26 "name": _kingfish["name"],
27 "email": _kingfish["email"],
28 "exp": 1715289767,
29 "iat": 1715116967,
30 "nbf": 1715116967,
31 "sub": _kingfish["id"],
32 "aud": [
33 "auth.globus.org",
34 _client_id,
35 ],
36 "iss": "https://auth.globus.org",
37 },
38 metadata={
39 "client_id": _client_id,
40 "scope": _scope,
41 **_kingfish,
42 },
43 )
44 )