Basic Authentication Screen¶
This screen is used to authenticate the user for basic authentication apps.
Definition¶
@Composable
fun BasicAuthenticationScreen(
state: BasicAuthenticationScreenState,
basicAuthenticationScreenSettings: BasicAuthenticationScreenSettings? = null,
cancelButtonClickListener: ViewClickListener? = null,
confirmButtonClickListener: ((userName: String, password: String) -> Unit)? = null,
) { ... }
class BasicAuthenticationScreenState(
userName: String = "",
password: String = "",
error: String = "",
busy: Boolean = false
) { ... }
@Composable
fun rememberBasicAuthenticationScreenState(
userName: String = "",
password: String = "",
error: String = "",
busy: Boolean = false
) { ... }
Like the Discovery Service Screen, this screen also has a state
argument to help the client code update the UI states.
Example¶
composable("screen_basic_auth") {
val basicScreenState = rememberBasicAuthenticationScreenState()
BasicAuthenticationScreen(state = basicScreenState) { _, _ ->
basicScreenState.errorState.value = "Basic error"
basicScreenState.busyState.value = true
}
}
Last update: February 20, 2023