MOB-55 Fixed bug with mobile app

This commit is contained in:
TanelOrumaa 2021-12-07 00:01:20 +02:00
parent 0da3e17b28
commit d92656d982
2 changed files with 3 additions and 2 deletions

View File

@ -125,6 +125,7 @@ class HomeFragment : Fragment() {
intentParams.setAuthUrl(postAuthTokenUrl)
val address = "https://" + URL(getAuthChallengeUrl).host
intentParams.setOrigin(address)
Log.w("ORIGIN", intentParams.origin)
intentParams.setHeaders(headers)
Ion.getDefault(activity).conscryptMiddleware.enable(false)
Ion.with(activity)

View File

@ -61,11 +61,11 @@ class ResultFragment : Fragment() {
fun postToken() {
val json = JsonObject()
json.addProperty("token", paramsModel.token)
json.addProperty("challenge", paramsModel.challenge)
json.addProperty("headers", paramsModel.headers)
Ion.getDefault(activity).conscryptMiddleware.enable(false)
Ion.with(activity)
.load(paramsModel.origin + paramsModel.authUrl)
.load(paramsModel.authUrl)
.setJsonObjectBody(json)
.asJsonObject()
.setCallback { e, result ->