Configuration model
To establish communication with the IDAAS-core, the iOS SDK has to be provided with a correct configuration model. This can be done using the Mobile SDK Configurator. This tool will automatically set all required values and ensure those are aligned with configuration on the IDAAS-core.
To configure the iOS SDK, some data must be provided:
-
Application data:
ONGAppIdentifier
is the application identifier used in dynamic client registration.ONGAppPlatform
is the application platform used in dynamic client registration.ONGAppVersion
is the application version used in dynamic client registration.ONGAppBaseURL
is the base URL of the OAuth server installation.ONGResourceBaseURL
is the base URL of the resource server.ONGRedirectURL
is the redirect URL used to complete registration process.
-
Certificates used for the certificate pinning.
-
Server public key when payload encryption feature is turned on.
What the Mobile SDK Configurator does for you
If the Mobile SDK Configurator was used to apply configuration, then it automatically generates a OneginiConfigModel
class with provided data.
An example of the generated file:
Manual configuration
To configure the cSDK manually, its required to create an instance of the ConfigModel
. Then this object needs to be passed to ClientBuilder
when creating a client instance. Example:
The ConfigModel
can also be instantiated from a .plist file using filePath
initializer: