mirror of
https://github.com/TanelOrumaa/Estonian-ID-card-mobile-authenticator-POC.git
synced 2024-12-22 12:30:16 +02:00
deleted unused code
This commit is contained in:
parent
32336ffb2b
commit
866c3c24a7
@ -19,7 +19,7 @@ private const val AUTH_URL = "$BASE_URL/auth/login"
|
|||||||
private const val CHALLENGE_URL = "$BASE_URL/auth/challenge"
|
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).
|
* Single purpose app that launches the MobileAuthApp and gets the response back (JWT).
|
||||||
*/
|
*/
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
@ -55,7 +55,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
showLogin()
|
showLogin()
|
||||||
|
|
||||||
binding.loginOptionNfcButton.setOnClickListener {
|
binding.loginOptionNfcButton.setOnClickListener {
|
||||||
//getData()
|
|
||||||
launchAuth()
|
launchAuth()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,31 +75,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
authLauncher.launch(launchIntent)
|
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() {
|
private fun showLogin() {
|
||||||
binding.loginOptions.visibility = View.VISIBLE
|
binding.loginOptions.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user