Skip to content

Commit

Permalink
Upgrade to PowerAuth 1.8.0 (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 authored Nov 27, 2023
1 parent ac6fd21 commit a03ab7d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 20 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ jobs:
CL_LGN: ${{ secrets.TESTS_CL_LGN }}
CL_PWD: ${{ secrets.TESTS_CL_PWD }}
CL_AID: ${{ secrets.TESTS_CL_AID }}
APP_KEY: ${{ secrets.TESTS_APP_KEY }}
APP_SECRET: ${{ secrets.TESTS_APP_SECRET }}
MASTER_SERVER_PUBLIC_KEY: ${{ secrets.TESTS_MASTER_SERVER_PUBLIC_KEY }}
SDK_CONFIG: ${{ secrets.TESTS_SDK_CONFIG }}
ER_URL: ${{ secrets.TESTS_ER_URL }}
OP_URL: ${{ secrets.TESTS_OP_URL }}
IN_URL: ${{ secrets.TESTS_IN_URL }}
run: echo -e tests.sdk.cloudServerUrl="$CL_URL"\\ntests.sdk.cloudServerLogin="$CL_LGN"\\ntests.sdk.cloudServerPassword="$CL_PWD"\\ntests.sdk.cloudApplicationId="$CL_AID"\\ntests.sdk.enrollmentServerUrl="$ER_URL"\\ntests.sdk.operationsServerUrl="$OP_URL"\\ntests.sdk.inboxServerUrl="$IN_URL"\\ntests.sdk.appKey="$APP_KEY"\\ntests.sdk.appSecret="$APP_SECRET"\\ntests.sdk.masterServerPublicKey="$MASTER_SERVER_PUBLIC_KEY" > configs/integration-tests.properties
run: echo -e tests.sdk.cloudServerUrl="$CL_URL"\\ntests.sdk.cloudServerLogin="$CL_LGN"\\ntests.sdk.cloudServerPassword="$CL_PWD"\\ntests.sdk.cloudApplicationId="$CL_AID"\\ntests.sdk.enrollmentServerUrl="$ER_URL"\\ntests.sdk.operationsServerUrl="$OP_URL"\\ntests.sdk.inboxServerUrl="$IN_URL"\\ntests.sdk.sdkConfig="$SDK_CONFIG" > configs/integration-tests.properties
- name: Test the app (integration tests)
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
4 changes: 1 addition & 3 deletions buildSrc/src/main/kotlin/ProjectConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ fun loadInstrumentationTestConfigProperties(project: Project, defaultConfig: Def
"tests.sdk.enrollmentServerUrl",
"tests.sdk.operationsServerUrl",
"tests.sdk.inboxServerUrl",
"tests.sdk.appKey",
"tests.sdk.appSecret",
"tests.sdk.masterServerPublicKey"
"tests.sdk.sdkConfig"
)

project.logger.info("LOADING_PROPERTIES Reading $configPropertiesFile")
Expand Down
4 changes: 1 addition & 3 deletions configs/integration-tests.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ tests.sdk.operationsServerUrl=http://localhost/enrollment-server
tests.sdk.inboxServerUrl=http://localhost/enrollment-server

# Configuration of the PowerAuth server
tests.sdk.appKey=
tests.sdk.appSecret=
tests.sdk.masterServerPublicKey=
tests.sdk.sdkConfig=
8 changes: 4 additions & 4 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ dependencies {
// DO NOT UPGRADE ABOVE 3.12.X! Version 3.12 is the last version supporting TLS 1 and 1.1
// If upgraded, the app will crash on android 4.4
implementation("com.squareup.okhttp3:okhttp:3.12.13")
implementation("com.wultra.android.powerauth:powerauth-networking:1.2.2")
implementation("com.wultra.android.powerauth:powerauth-networking:1.3.0")

// Dependencies
compileOnly("com.wultra.android.powerauth:powerauth-sdk:1.7.8")
compileOnly("com.wultra.android.powerauth:powerauth-sdk:1.8.0")
compileOnly("io.getlime.core:rest-model-base:1.2.0")

// TestDependencies
testImplementation("junit:junit:4.13.2")

// Android tests
androidTestImplementation("com.jakewharton.threetenabp:threetenabp:1.1.1")
androidTestImplementation("com.wultra.android.powerauth:powerauth-sdk:1.7.8")
androidTestImplementation("com.wultra.android.powerauth:powerauth-networking:1.2.2")
androidTestImplementation("com.wultra.android.powerauth:powerauth-sdk:1.8.0")
androidTestImplementation("com.wultra.android.powerauth:powerauth-networking:1.3.0")
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test:core:1.5.0")
Expand Down
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# and limitations under the License.
#

VERSION_NAME=1.7.1
VERSION_NAME=1.8.0-SNAPSHOT
GROUP_ID=com.wultra.android.mtokensdk
ARTIFACT_ID=wultra-mtoken-sdk
8 changes: 3 additions & 5 deletions library/src/androidTest/java/IntegrationUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ class IntegrationUtils {
private val enrollmentUrl = getInstrumentationParameter("enrollmentServerUrl")
private val operationsUrl = getInstrumentationParameter("operationsServerUrl")
private val inboxUrl = getInstrumentationParameter("inboxServerUrl")
private val appKey = getInstrumentationParameter("appKey")
private val appSecret = getInstrumentationParameter("appSecret")
private val masterPublicKey = getInstrumentationParameter("masterServerPublicKey")
private val sdkConfig = getInstrumentationParameter("sdkConfig")
private var activationName = "" // will be filled when activation is created
private var registrationId = "" // will be filled when activation is created

Expand All @@ -96,7 +94,7 @@ class IntegrationUtils {

// CREATE PA INSTANCE

val cfg = PowerAuthConfiguration.Builder("tests", enrollmentUrl, appKey, appSecret, masterPublicKey).build()
val cfg = PowerAuthConfiguration.Builder("tests", enrollmentUrl, sdkConfig).build()
val clientCfg = PowerAuthClientConfiguration.Builder().allowUnsecuredConnection(true).build()
val pa = PowerAuthSDK.Builder(cfg).clientConfiguration(clientCfg).build(context)

Expand Down Expand Up @@ -138,7 +136,7 @@ class IntegrationUtils {

// COMMIT ACTIVATION LOCALLY

val result = pa.commitActivationWithPassword(context, pin)
val result = pa.persistActivationWithPassword(context, pin)
Log.d("prepare activation", "commitActivationWithPassword result: $result")

// COMMIT ACTIVATION ON THE SERVER
Expand Down

0 comments on commit a03ab7d

Please sign in to comment.