iOS
UAEPASSRouter.shared.spConfig = SPConfig(redirectUriLogin: "client redirect url",
scope: "client login scope",
state: "RANDOM 24 alpha numeric", //Randomly Generated Code 24 alpha numeric.
successSchemeURL: "UUUUU://", //client success url scheme.
failSchemeURL: "CCCCC://", //client failure url scheme.
signingScope: "urn:safelayer:eidas:sign:process:document") // client signing scope
UAEPASSRouter.shared.environmentConfig = UAEPassConfig(clientID: "your client id", env: .production)
--- env (environment can be : .production or .stg)print("<><><><> appDelegate URL : \(url.absoluteString)")
if url.absoluteString.contains(HandleURLScheme.externalURLSchemeSuccess()) {
if let topViewController = UserInterfaceInfo.topViewController() {
if let webViewController = topViewController as? UAEPassWebViewController {
webViewController.forceReload()
}
}
return true
} else if url.absoluteString.contains(HandleURLScheme.externalURLSchemeFail()) {
guard let webViewController = UserInterfaceInfo.topViewController() as? UAEPassWebViewController else { return false}
webViewController.foreceStop()
let alertController = UIAlertController(title: "Failed to login with UAE PASS Login", message: "Try again later", preferredStyle: .actionSheet)
let okAction = UIAlertAction(title: "OK", style: UIAlertAction.Style.default) { _ in
NSLog("OK Pressed")
webViewController.navigationController?.popViewController(animated: true)
}
alertController.addAction(okAction)
self.window?.rootViewController?.present(alertController, animated: true, completion: nil)
return false
}
return true
}Last updated
Was this helpful?