UsernamePasswordChallenge

class UsernamePasswordChallenge(val url: String, onUsernamePasswordReceived: (username: String, password: String) -> Unit, onCancel: () -> Unit)

Represents an authentication challenge requiring a username and password.

Since

200.2.0

Constructors

Link copied to clipboard
constructor(url: String, onUsernamePasswordReceived: (username: String, password: String) -> Unit, onCancel: () -> Unit)

Properties

Link copied to clipboard
val additionalMessage: StateFlow<String?>
Link copied to clipboard
Link copied to clipboard
val url: String

the name of the server that initiated this challenge

Functions

Link copied to clipboard
fun cancel()

Cancels the challenge.. Note that either continueWithCredentials or cancel can only be called once on a given UsernamePasswordChallenge object; further calls will have no effect.

Link copied to clipboard
fun continueWithCredentials(username: String, password: String)

Completes the challenge with the credentials. Note that either continueWithCredentials or cancel can only be called once on a given UsernamePasswordChallenge object; further calls will have no effect.

Link copied to clipboard

Emits an additional message to additionalMessage to be displayed in the prompt as an error. A null value is intended to remove the error message.