You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, our iOS PowerAuthSDK class internally depends on several shared configuration instances: PA2ClientConfiguration.sharedInstance() & PA2KeychainConfiguration.sharedInstance(). We should break this dependency and allow object instantiation with using custom configuration objects.
Benefits
I'm working on LimeAuth library where I would like to allow instantiate high level object with all application provided configurations. Right now, it's kind of confusing when developer has to provide own PowerAuthConfiguration and then access shared instances for networking, etc...
Better thread safety. Later changes to shared configurations doesn't affect already instantiated SDK objects.
Better object testability
Proposed changes
Both, PA2ClientConfiguration and PA2KeychainConfiguration should implement NSCopying protocol.
Add new read-only keychainConfiguration property to PowerAuthSDK. The property should return copy of internally used configuration, to do not allow post-inistantiation changes in keychain configuration.
Add new read-only httpClientConfiguration property to PowerAuthSDK. The property should return copy of internally used configuration, to do not allow post-inistantiation changes in client configuration.
Add new designated initializer to PowerAuthSDK to allow construct object with exact keychain & client configurations. Due to backward compatibility, we should provide fallbacks to shared config instances once one of the new parameters is nil
Fix PA2PrivateHttpTokenProvider which also depends on PA2ClientConfiguration.sharedInstance()
The text was updated successfully, but these errors were encountered:
Currently, our iOS
PowerAuthSDK
class internally depends on several shared configuration instances:PA2ClientConfiguration.sharedInstance()
&PA2KeychainConfiguration.sharedInstance()
. We should break this dependency and allow object instantiation with using custom configuration objects.Benefits
PowerAuthConfiguration
and then access shared instances for networking, etc...Proposed changes
PA2ClientConfiguration
andPA2KeychainConfiguration
should implementNSCopying
protocol.keychainConfiguration
property toPowerAuthSDK
. The property should return copy of internally used configuration, to do not allow post-inistantiation changes in keychain configuration.httpClientConfiguration
property toPowerAuthSDK
. The property should return copy of internally used configuration, to do not allow post-inistantiation changes in client configuration.PowerAuthSDK
to allow construct object with exact keychain & client configurations. Due to backward compatibility, we should provide fallbacks to shared config instances once one of the new parameters is nilPA2PrivateHttpTokenProvider
which also depends onPA2ClientConfiguration.sharedInstance()
The text was updated successfully, but these errors were encountered: