SDK
Android Native:
Download SDK Files.
Add Client ID in UAEPassRequestModels.java
Add Client Secret in UAEPassRequestModels.java
Add Redirect URL in UAEPassRequestModels.java
Choose the Environment, Whether it is staging or production.
In the activity from where UAE Pass Authentication is required, copy the "Adding Custom Scheme and Host" section to the AndroidManifest file to that particular activity, and make the launch mode as singleTask. (android:launchMode="singleTask").
In the modules Build.gradle file, copy the "Adding Custom Scheme Variables" section to the defaultConfig.
Change "URI_SCHEME" and "scheme" value to your app name.
This is a mandatory step to avoid conflicting with other apps in the future.
9. Check whether the project has Kotlin enabled. If not, open app level Build.gradle and copy "Enable Kotlin Version" and "Enable Kotlin Dependency" to respective place. Also in the modules Build.gradle, copy "Enable Kotlin Dependency" section to the dependencies.
10. In the Activity from where UAE Pass Authentication is triggered, copy the section "Callback to handle UAE Pass callback".
A global search can be made for the term "//UAE PASS" which will display the modifications that are required to be made.
iOS Native
Download SDK Files.
Setup the Framework.
- Create LocalPods folder if not already created.
- Add UAEPPASSClient folder in LocalPods folder.
- Add pod 'UAEPassClient', :path => "LocalPods/UAEPassClient" to your podfile.
3. Open AppDelegate and add the following:
- import UAEPassClient
4. In didFinishLaunchingWithOptions, add the below:
5. Add UAE Pass scheme in your project info.plist in LSApplicationQueriesSchemes (Already added in this sample).
6. After pressing login with UAE PASS button, choose the prefered environment to login through UIAlertController and from this action a trace can be done to show how it works.
7. From application(_: UIApplication, handleOpen url: URL) -> Bool in AppDelegate
Apply a force to current webview to reload or stop loading incase of success or failure.
This sample contains three view controllers :
-- ViewController.swift (main screen which contains login button and UIAlertController to select required environment).
-- UserProfileViewController.swift (Just simple view to show user profile details and it contains sign document scneario as well).
-- UAEPassWebViewController.swift (Resposible for handling webView requests to generate uaepass code to use it for token generation).
8. For the Signing Flow, the following steps is required:
It should be a valid PDF document, and the sample code for downloading the pdf file is given.
A valid token should be generated for the signing process.
The valid pdf document should then be uploaded to UAE PASS.
After the upload, a request for signing should be sent. The following can then be selected:
Signature type: Advanced or Qualified
The page which signature will be placed
Signature coordinates and Signature size
9. testSignData.json is a very important file as this is the signing information which should be passed to UAEPASS and it is expected to be recieved from the backend. It is also required to be reconfigured to add SP's own app scheme.
This sample supports dark mode as well.
For visitor integration: SP need to use the below scopes to their first authentication call to retrieve the unifiedID and profileType attribute of the user:
Last updated