File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,17 @@ def encode_saml_assertion(assertion):
3333 CLIENT_ASSERTION_TYPE_SAML2 = "urn:ietf:params:oauth:client-assertion-type:saml2-bearer"
3434 client_assertion_encoders = {CLIENT_ASSERTION_TYPE_SAML2 : encode_saml_assertion }
3535
36+ @property
37+ def session (self ):
38+ warnings .warn ("Will be gone in next major release" , DeprecationWarning )
39+ return self ._http_client
40+
41+ @session .setter
42+ def session (self , value ):
43+ warnings .warn ("Will be gone in next major release" , DeprecationWarning )
44+ self ._http_client = value
45+
46+
3647 def __init__ (
3748 self ,
3849 server_configuration , # type: dict
Original file line number Diff line number Diff line change @@ -174,3 +174,11 @@ def test_device_flow(self):
174174 assertion = lambda : self .assertIn ('access_token' , result ),
175175 skippable_errors = self .client .DEVICE_FLOW_RETRIABLE_ERRORS )
176176
177+
178+ class TestSessionAccessibility (unittest .TestCase ):
179+ def test_accessing_session_property_for_backward_compatibility (self ):
180+ client = Client ({}, "client_id" )
181+ client .session
182+ client .session .close ()
183+ client .session = "something"
184+
You can’t perform that action at this time.
0 commit comments