From dd2f6305a26f9b7db0532dee657311cd5b583247 Mon Sep 17 00:00:00 2001 From: Daniel Lindau Date: Mon, 25 Nov 2024 09:34:09 +0100 Subject: [PATCH] feat: Update to latest SDK versions Update to 4.3.0 on iOS, and 4.2.0 on Android See https://curity.io/docs/haapi-ios-sdk/latest/ and https://curity.io/docs/haapi-android-sdk/latest/ for the changes --- android/build.gradle | 2 +- ios/HaapiModule/ConfigurationHelper.swift | 6 ++++-- react-native-haapi-module.podspec | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8988cef..88cb27a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -47,7 +47,7 @@ def safeExtGet(prop, fallback) { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22" - implementation "se.curity.identityserver:identityserver.haapi.android.sdk:4.1.0" + implementation "se.curity.identityserver:identityserver.haapi.android.sdk:4.2.1" implementation "com.google.code.gson:gson:2.10" implementation "com.facebook.react:react-android:${safeExtGet('reactNativeVersion', '+')}" implementation "androidx.credentials:credentials:1.2.2" diff --git a/ios/HaapiModule/ConfigurationHelper.swift b/ios/HaapiModule/ConfigurationHelper.swift index 9c4b035..4973188 100644 --- a/ios/HaapiModule/ConfigurationHelper.swift +++ b/ios/HaapiModule/ConfigurationHelper.swift @@ -31,6 +31,7 @@ class ConfigurationHelper { let urlSession = URLSession(configuration: URLSessionConfiguration.haapi, delegate: validateTlsCertificate ? nil : TrustAllCertsDelegate(), delegateQueue: nil) + let boundedTokenConfiguration = BoundedTokenConfiguration() return HaapiConfiguration(name: getStringOrDefault(data: data, configKey: "configurationName", defaultString: "HaapiModule"), clientId: try getStringOrThrow(data: data, configKey: "clientId"), @@ -41,7 +42,8 @@ class ConfigurationHelper { httpHeadersProvider: nil, authorizationParametersProvider: { () -> OAuthAuthorizationParameters in OAuthAuthorizationParameters(scopes: scope, acrValues: acrValues) }, isAutoRedirect: true, - urlSession: urlSession) + urlSession: urlSession, + tokenBoundConfiguration: boundedTokenConfiguration) } @@ -66,4 +68,4 @@ class ConfigurationHelper { .split(separator: " ") .map { String($0) } } -} \ No newline at end of file +} diff --git a/react-native-haapi-module.podspec b/react-native-haapi-module.podspec index a8a2682..e808ff0 100644 --- a/react-native-haapi-module.podspec +++ b/react-native-haapi-module.podspec @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}" s.dependency "React-Core" - s.dependency "IdsvrHaapiSdk", "4.1.4" -end + s.dependency "IdsvrHaapiSdk", "4.3.0" +end \ No newline at end of file