rxfoundry.clients.swifty_oauth_api 0.0.847__py3-none-any.whl → 0.0.849__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.
- rxfoundry/clients/swifty_oauth_api/__init__.py +1 -1
- rxfoundry/clients/swifty_oauth_api/api/o_auth_api.py +31 -30
- rxfoundry/clients/swifty_oauth_api/configuration.py +10 -0
- rxfoundry/clients/swifty_oauth_api/models/__init__.py +1 -1
- rxfoundry/clients/swifty_oauth_api/models/get_token_request.py +94 -0
- {rxfoundry_clients_swifty_oauth_api-0.0.847.dist-info → rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info}/METADATA +1 -1
- {rxfoundry_clients_swifty_oauth_api-0.0.847.dist-info → rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info}/RECORD +9 -8
- {rxfoundry_clients_swifty_oauth_api-0.0.847.dist-info → rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info}/WHEEL +0 -0
- {rxfoundry_clients_swifty_oauth_api-0.0.847.dist-info → rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info}/top_level.txt +0 -0
@@ -32,6 +32,6 @@ from rxfoundry.clients.swifty_oauth_api.exceptions import ApiAttributeError
|
|
32
32
|
from rxfoundry.clients.swifty_oauth_api.exceptions import ApiException
|
33
33
|
|
34
34
|
# import models into sdk package
|
35
|
-
from rxfoundry.clients.swifty_oauth_api.models.
|
35
|
+
from rxfoundry.clients.swifty_oauth_api.models.get_token_request import GetTokenRequest
|
36
36
|
from rxfoundry.clients.swifty_oauth_api.models.token_response import TokenResponse
|
37
37
|
from rxfoundry.clients.swifty_oauth_api.models.user_info_response import UserInfoResponse
|
@@ -17,7 +17,7 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
17
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
18
18
|
from typing_extensions import Annotated
|
19
19
|
|
20
|
-
from rxfoundry.clients.swifty_oauth_api.models.
|
20
|
+
from rxfoundry.clients.swifty_oauth_api.models.get_token_request import GetTokenRequest
|
21
21
|
from rxfoundry.clients.swifty_oauth_api.models.token_response import TokenResponse
|
22
22
|
from rxfoundry.clients.swifty_oauth_api.models.user_info_response import UserInfoResponse
|
23
23
|
|
@@ -40,9 +40,9 @@ class OAuthApi:
|
|
40
40
|
|
41
41
|
|
42
42
|
@validate_call
|
43
|
-
def
|
43
|
+
def get_token(
|
44
44
|
self,
|
45
|
-
|
45
|
+
get_token_request: GetTokenRequest,
|
46
46
|
_request_timeout: Union[
|
47
47
|
None,
|
48
48
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -59,8 +59,8 @@ class OAuthApi:
|
|
59
59
|
"""Get a token
|
60
60
|
|
61
61
|
|
62
|
-
:param
|
63
|
-
:type
|
62
|
+
:param get_token_request: (required)
|
63
|
+
:type get_token_request: GetTokenRequest
|
64
64
|
:param _request_timeout: timeout setting for this request. If one
|
65
65
|
number provided, it will be total request
|
66
66
|
timeout. It can also be a pair (tuple) of
|
@@ -83,8 +83,8 @@ class OAuthApi:
|
|
83
83
|
:return: Returns the result object.
|
84
84
|
""" # noqa: E501
|
85
85
|
|
86
|
-
_param = self.
|
87
|
-
|
86
|
+
_param = self._get_token_serialize(
|
87
|
+
get_token_request=get_token_request,
|
88
88
|
_request_auth=_request_auth,
|
89
89
|
_content_type=_content_type,
|
90
90
|
_headers=_headers,
|
@@ -107,9 +107,9 @@ class OAuthApi:
|
|
107
107
|
|
108
108
|
|
109
109
|
@validate_call
|
110
|
-
def
|
110
|
+
def get_token_with_http_info(
|
111
111
|
self,
|
112
|
-
|
112
|
+
get_token_request: GetTokenRequest,
|
113
113
|
_request_timeout: Union[
|
114
114
|
None,
|
115
115
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -126,8 +126,8 @@ class OAuthApi:
|
|
126
126
|
"""Get a token
|
127
127
|
|
128
128
|
|
129
|
-
:param
|
130
|
-
:type
|
129
|
+
:param get_token_request: (required)
|
130
|
+
:type get_token_request: GetTokenRequest
|
131
131
|
:param _request_timeout: timeout setting for this request. If one
|
132
132
|
number provided, it will be total request
|
133
133
|
timeout. It can also be a pair (tuple) of
|
@@ -150,8 +150,8 @@ class OAuthApi:
|
|
150
150
|
:return: Returns the result object.
|
151
151
|
""" # noqa: E501
|
152
152
|
|
153
|
-
_param = self.
|
154
|
-
|
153
|
+
_param = self._get_token_serialize(
|
154
|
+
get_token_request=get_token_request,
|
155
155
|
_request_auth=_request_auth,
|
156
156
|
_content_type=_content_type,
|
157
157
|
_headers=_headers,
|
@@ -174,9 +174,9 @@ class OAuthApi:
|
|
174
174
|
|
175
175
|
|
176
176
|
@validate_call
|
177
|
-
def
|
177
|
+
def get_token_without_preload_content(
|
178
178
|
self,
|
179
|
-
|
179
|
+
get_token_request: GetTokenRequest,
|
180
180
|
_request_timeout: Union[
|
181
181
|
None,
|
182
182
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -193,8 +193,8 @@ class OAuthApi:
|
|
193
193
|
"""Get a token
|
194
194
|
|
195
195
|
|
196
|
-
:param
|
197
|
-
:type
|
196
|
+
:param get_token_request: (required)
|
197
|
+
:type get_token_request: GetTokenRequest
|
198
198
|
:param _request_timeout: timeout setting for this request. If one
|
199
199
|
number provided, it will be total request
|
200
200
|
timeout. It can also be a pair (tuple) of
|
@@ -217,8 +217,8 @@ class OAuthApi:
|
|
217
217
|
:return: Returns the result object.
|
218
218
|
""" # noqa: E501
|
219
219
|
|
220
|
-
_param = self.
|
221
|
-
|
220
|
+
_param = self._get_token_serialize(
|
221
|
+
get_token_request=get_token_request,
|
222
222
|
_request_auth=_request_auth,
|
223
223
|
_content_type=_content_type,
|
224
224
|
_headers=_headers,
|
@@ -236,9 +236,9 @@ class OAuthApi:
|
|
236
236
|
return response_data.response
|
237
237
|
|
238
238
|
|
239
|
-
def
|
239
|
+
def _get_token_serialize(
|
240
240
|
self,
|
241
|
-
|
241
|
+
get_token_request,
|
242
242
|
_request_auth,
|
243
243
|
_content_type,
|
244
244
|
_headers,
|
@@ -264,8 +264,8 @@ class OAuthApi:
|
|
264
264
|
# process the header parameters
|
265
265
|
# process the form parameters
|
266
266
|
# process the body parameter
|
267
|
-
if
|
268
|
-
_body_params =
|
267
|
+
if get_token_request is not None:
|
268
|
+
_body_params = get_token_request
|
269
269
|
|
270
270
|
|
271
271
|
# set the HTTP header `Accept`
|
@@ -313,7 +313,7 @@ class OAuthApi:
|
|
313
313
|
|
314
314
|
|
315
315
|
@validate_call
|
316
|
-
def
|
316
|
+
def get_user_info(
|
317
317
|
self,
|
318
318
|
_request_timeout: Union[
|
319
319
|
None,
|
@@ -353,7 +353,7 @@ class OAuthApi:
|
|
353
353
|
:return: Returns the result object.
|
354
354
|
""" # noqa: E501
|
355
355
|
|
356
|
-
_param = self.
|
356
|
+
_param = self._get_user_info_serialize(
|
357
357
|
_request_auth=_request_auth,
|
358
358
|
_content_type=_content_type,
|
359
359
|
_headers=_headers,
|
@@ -376,7 +376,7 @@ class OAuthApi:
|
|
376
376
|
|
377
377
|
|
378
378
|
@validate_call
|
379
|
-
def
|
379
|
+
def get_user_info_with_http_info(
|
380
380
|
self,
|
381
381
|
_request_timeout: Union[
|
382
382
|
None,
|
@@ -416,7 +416,7 @@ class OAuthApi:
|
|
416
416
|
:return: Returns the result object.
|
417
417
|
""" # noqa: E501
|
418
418
|
|
419
|
-
_param = self.
|
419
|
+
_param = self._get_user_info_serialize(
|
420
420
|
_request_auth=_request_auth,
|
421
421
|
_content_type=_content_type,
|
422
422
|
_headers=_headers,
|
@@ -439,7 +439,7 @@ class OAuthApi:
|
|
439
439
|
|
440
440
|
|
441
441
|
@validate_call
|
442
|
-
def
|
442
|
+
def get_user_info_without_preload_content(
|
443
443
|
self,
|
444
444
|
_request_timeout: Union[
|
445
445
|
None,
|
@@ -479,7 +479,7 @@ class OAuthApi:
|
|
479
479
|
:return: Returns the result object.
|
480
480
|
""" # noqa: E501
|
481
481
|
|
482
|
-
_param = self.
|
482
|
+
_param = self._get_user_info_serialize(
|
483
483
|
_request_auth=_request_auth,
|
484
484
|
_content_type=_content_type,
|
485
485
|
_headers=_headers,
|
@@ -497,7 +497,7 @@ class OAuthApi:
|
|
497
497
|
return response_data.response
|
498
498
|
|
499
499
|
|
500
|
-
def
|
500
|
+
def _get_user_info_serialize(
|
501
501
|
self,
|
502
502
|
_request_auth,
|
503
503
|
_content_type,
|
@@ -537,6 +537,7 @@ class OAuthApi:
|
|
537
537
|
|
538
538
|
# authentication setting
|
539
539
|
_auth_settings: List[str] = [
|
540
|
+
'opaque_token'
|
540
541
|
]
|
541
542
|
|
542
543
|
return self.api_client.param_serialize(
|
@@ -114,6 +114,7 @@ HTTPSignatureAuthSetting = TypedDict(
|
|
114
114
|
AuthSettings = TypedDict(
|
115
115
|
"AuthSettings",
|
116
116
|
{
|
117
|
+
"opaque_token": BearerFormatAuthSetting,
|
117
118
|
},
|
118
119
|
total=False,
|
119
120
|
)
|
@@ -164,6 +165,7 @@ class Configuration:
|
|
164
165
|
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
165
166
|
in PEM (str) or DER (bytes) format.
|
166
167
|
|
168
|
+
:Example:
|
167
169
|
"""
|
168
170
|
|
169
171
|
_default: ClassVar[Optional[Self]] = None
|
@@ -491,6 +493,14 @@ class Configuration:
|
|
491
493
|
:return: The Auth Settings information dict.
|
492
494
|
"""
|
493
495
|
auth: AuthSettings = {}
|
496
|
+
if self.access_token is not None:
|
497
|
+
auth['opaque_token'] = {
|
498
|
+
'type': 'bearer',
|
499
|
+
'in': 'header',
|
500
|
+
'format': 'opaque',
|
501
|
+
'key': 'Authorization',
|
502
|
+
'value': 'Bearer ' + self.access_token
|
503
|
+
}
|
494
504
|
return auth
|
495
505
|
|
496
506
|
def to_debug_report(self) -> str:
|
@@ -15,6 +15,6 @@
|
|
15
15
|
|
16
16
|
|
17
17
|
# import models into model package
|
18
|
-
from rxfoundry.clients.swifty_oauth_api.models.
|
18
|
+
from rxfoundry.clients.swifty_oauth_api.models.get_token_request import GetTokenRequest
|
19
19
|
from rxfoundry.clients.swifty_oauth_api.models.token_response import TokenResponse
|
20
20
|
from rxfoundry.clients.swifty_oauth_api.models.user_info_response import UserInfoResponse
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Swifty OAuth API
|
5
|
+
|
6
|
+
API for the Swifty OAuth Backend
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class GetTokenRequest(BaseModel):
|
27
|
+
"""
|
28
|
+
GetTokenRequest
|
29
|
+
""" # noqa: E501
|
30
|
+
grant_type: Optional[StrictStr] = Field(default=None, description="Either 'password' or 'refresh_token'")
|
31
|
+
username: Optional[StrictStr] = Field(default=None, description="Required if grant_type is 'password'")
|
32
|
+
password: Optional[StrictStr] = Field(default=None, description="Required if grant_type is 'password'")
|
33
|
+
refresh_token: Optional[StrictStr] = Field(default=None, description="Required if grant_type is 'refresh_token'")
|
34
|
+
__properties: ClassVar[List[str]] = ["grant_type", "username", "password", "refresh_token"]
|
35
|
+
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
+
"""Create an instance of GetTokenRequest from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
59
|
+
|
60
|
+
This has the following differences from calling pydantic's
|
61
|
+
`self.model_dump(by_alias=True)`:
|
62
|
+
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
64
|
+
were set at model initialization. Other fields with value `None`
|
65
|
+
are ignored.
|
66
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
return _dict
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
+
"""Create an instance of GetTokenRequest from a dict"""
|
80
|
+
if obj is None:
|
81
|
+
return None
|
82
|
+
|
83
|
+
if not isinstance(obj, dict):
|
84
|
+
return cls.model_validate(obj)
|
85
|
+
|
86
|
+
_obj = cls.model_validate({
|
87
|
+
"grant_type": obj.get("grant_type"),
|
88
|
+
"username": obj.get("username"),
|
89
|
+
"password": obj.get("password"),
|
90
|
+
"refresh_token": obj.get("refresh_token")
|
91
|
+
})
|
92
|
+
return _obj
|
93
|
+
|
94
|
+
|
@@ -1,19 +1,20 @@
|
|
1
1
|
rxfoundry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
rxfoundry/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
rxfoundry/clients/swifty_oauth_api/__init__.py,sha256=
|
3
|
+
rxfoundry/clients/swifty_oauth_api/__init__.py,sha256=uaWqqofql85j47dRURAUmo0DczTkL87xf2epnoGDZ_k,1400
|
4
4
|
rxfoundry/clients/swifty_oauth_api/api_client.py,sha256=30YxPIQQFEBltgYfUXIVrm_o5sRu-X_d4i2jftcEZfw,27570
|
5
5
|
rxfoundry/clients/swifty_oauth_api/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
6
|
-
rxfoundry/clients/swifty_oauth_api/configuration.py,sha256=
|
6
|
+
rxfoundry/clients/swifty_oauth_api/configuration.py,sha256=pkavk5eVu4FGf8onAvYEJuEwk-_NyOgKY6KpkBp9GqA,18267
|
7
7
|
rxfoundry/clients/swifty_oauth_api/exceptions.py,sha256=SfBZh-znbPTJ5xwa6jYJycwoFC_26jkXf_MvCLBlW8A,6447
|
8
8
|
rxfoundry/clients/swifty_oauth_api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
rxfoundry/clients/swifty_oauth_api/rest.py,sha256=rb-sZSOuEXGxcOYaLb7ZDBq9R5HcOsBsoE1F7afetWc,9464
|
10
10
|
rxfoundry/clients/swifty_oauth_api/api/__init__.py,sha256=QsNHKS2BT5fu7DRAL9seAjhJMv2VWgvk42fLId69dyc,119
|
11
|
-
rxfoundry/clients/swifty_oauth_api/api/o_auth_api.py,sha256=
|
12
|
-
rxfoundry/clients/swifty_oauth_api/models/__init__.py,sha256=
|
11
|
+
rxfoundry/clients/swifty_oauth_api/api/o_auth_api.py,sha256=wq3OwjsBrcmirwsXF1lMufvgOVSF0WbXNF1RSdJSX6M,20817
|
12
|
+
rxfoundry/clients/swifty_oauth_api/models/__init__.py,sha256=UmSsR9PfgrBKDJCfagGHeK59IpWLXLiqjYvAGupw5Xw,605
|
13
|
+
rxfoundry/clients/swifty_oauth_api/models/get_token_request.py,sha256=ZESKTNWJXqFTzBmVZnHA2djwX6pPbG-HvRnAE-SrtOg,3097
|
13
14
|
rxfoundry/clients/swifty_oauth_api/models/oauth_token_post_request.py,sha256=ypbefN8F_KWfayTzum3d-k43MaNmw_e-LSLD6NErIGo,3121
|
14
15
|
rxfoundry/clients/swifty_oauth_api/models/token_response.py,sha256=rV8YZYJtzDz62d3xtlSTYBzA5ogN1Dc5GHaH3qBzybg,3035
|
15
16
|
rxfoundry/clients/swifty_oauth_api/models/user_info_response.py,sha256=3Ex-k5WV9DVpJG6z3md8EBUZaWjMu2lyUKN_fg1IZAc,3311
|
16
|
-
rxfoundry_clients_swifty_oauth_api-0.0.
|
17
|
-
rxfoundry_clients_swifty_oauth_api-0.0.
|
18
|
-
rxfoundry_clients_swifty_oauth_api-0.0.
|
19
|
-
rxfoundry_clients_swifty_oauth_api-0.0.
|
17
|
+
rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info/METADATA,sha256=ZMOUPFM6cpj7N5hH9lBBvYkr01JNZ-Cr1ZqG_ymtmoU,612
|
18
|
+
rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
19
|
+
rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info/top_level.txt,sha256=x7AlWW4imWljpZ91S0V0Pq8YFe0UFn8rBgeIQhJ5q5A,10
|
20
|
+
rxfoundry_clients_swifty_oauth_api-0.0.849.dist-info/RECORD,,
|
File without changes
|