Tests sso login mode

This commit is contained in:
ericdecanini 2022-03-02 15:23:39 +01:00
parent 448e8e001f
commit 12dc8a8112

View file

@ -34,6 +34,7 @@ import im.vector.app.features.signout.soft.epoxy.loginRedButtonItem
import im.vector.app.features.signout.soft.epoxy.loginTextItem import im.vector.app.features.signout.soft.epoxy.loginTextItem
import im.vector.app.features.signout.soft.epoxy.loginTitleItem import im.vector.app.features.signout.soft.epoxy.loginTitleItem
import im.vector.app.features.signout.soft.epoxy.loginTitleSmallItem import im.vector.app.features.signout.soft.epoxy.loginTitleSmallItem
import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
class SoftLogoutController @Inject constructor( class SoftLogoutController @Inject constructor(
@ -102,6 +103,8 @@ class SoftLogoutController @Inject constructor(
} }
} }
is Success -> { is Success -> {
val loginMode = state.asyncHomeServerLoginFlowRequest.invoke()
Timber.i("Login Mode: $loginMode")
when (state.asyncHomeServerLoginFlowRequest.invoke()) { when (state.asyncHomeServerLoginFlowRequest.invoke()) {
LoginMode.Password -> { LoginMode.Password -> {
loginPasswordFormItem { loginPasswordFormItem {
@ -123,6 +126,11 @@ class SoftLogoutController @Inject constructor(
} }
} }
is LoginMode.SsoAndPassword -> { is LoginMode.SsoAndPassword -> {
loginCenterButtonItem {
id("sso")
text(host.stringProvider.getString(R.string.login_signin_sso))
listener { host.listener?.signinFallbackSubmit() }
}
} }
LoginMode.Unsupported -> { LoginMode.Unsupported -> {
loginCenterButtonItem { loginCenterButtonItem {