From 866c3c24a736d5df0307ffece29fcc9f6e8cf932 Mon Sep 17 00:00:00 2001 From: Henrik Lepson Date: Mon, 17 Jan 2022 17:15:45 +0200 Subject: [PATCH] deleted unused code --- .../com/example/testmobileapp/MainActivity.kt | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/TestMobileApp/app/src/main/java/com/example/testmobileapp/MainActivity.kt b/TestMobileApp/app/src/main/java/com/example/testmobileapp/MainActivity.kt index d03a26a..8ff8e15 100644 --- a/TestMobileApp/app/src/main/java/com/example/testmobileapp/MainActivity.kt +++ b/TestMobileApp/app/src/main/java/com/example/testmobileapp/MainActivity.kt @@ -19,7 +19,7 @@ private const val AUTH_URL = "$BASE_URL/auth/login" private const val CHALLENGE_URL = "$BASE_URL/auth/challenge" /** - * Test mobile app to demonstrate how other applications can use MobileAuthApp. + * Test mobile app to demonstrate how other applications could potentially use MobileAuthApp. * Single purpose app that launches the MobileAuthApp and gets the response back (JWT). */ class MainActivity : AppCompatActivity() { @@ -55,7 +55,6 @@ class MainActivity : AppCompatActivity() { showLogin() binding.loginOptionNfcButton.setOnClickListener { - //getData() launchAuth() } @@ -76,31 +75,6 @@ class MainActivity : AppCompatActivity() { authLauncher.launch(launchIntent) } - /** - * Method for retrieving data from an endpoint. - * Ion library is used as it is very convenient for making simple GET requests. - */ - /* - private fun getData() { - // Enter the server endpoint address to here - val url = "$BASE_URL/auth/challenge" - Ion.getDefault(this).conscryptMiddleware.enable(false) - Ion.with(applicationContext) - .load(url) - .asJsonObject() - .setCallback { _, result -> - try { - // Get data from the result and call launchAuth method - val challenge = result.asJsonObject["nonce"].toString().replace("\"", "") - Log.v("Challenge", challenge) - launchAuth(challenge, BASE_URL, "/auth/authentication") - } catch (e: Exception) { - Log.i("GETrequest", "was unsuccessful") - } - } - } - */ - private fun showLogin() { binding.loginOptions.visibility = View.VISIBLE }