Configuration model
To establish communication with the Token Server, the iOS SDK has to be provided with a correct configuration model. This can be done using the SDK Configurator. This tool will automatically set all required values and ensure those are aligned with configuration on the token server. The process is explained in our developer quickstart.
In order to configure the SDK, some data needs to be provided:
-
Application data:
ONGAppIdentifier
- Application identifier used in dynamic client registration.ONGAppPlatform
- Application platform used in dynamic client registration.ONGAppVersion
- Application version used in dynamic client registration.ONGAppBaseURL
- Base url of the OAuth Server installation.ONGResourceBaseURL
- Base url of the resource server.ONGRedirectURL
- 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 SDK configurator does for you
If the SDK Configurator
was used to apply configuration then it automaticlly generates OneginiConfigModel
class with provided data.
An example of the generated file
Manual configuration
To configure the SDK manually its required to create an instance of ConfigModel
. Then this object needs to be passed to ClientBuilder
when creating Client
instance. Example:
ConfigModel
can also be instantiated from a .plist file using filePath
initializer: