Consider the Form authorization we implemented in the topic. What happens if we put Basic authentication instead of Form authentication? (This leaves the authentication name ("myFormAuth") and the rest of the code unchanged.)
install(Authentication) {
basic("myFormAuth") {
realm = "Access to the '/page' path"
validate { credentials ->
if (credentials.name == "Admin" && credentials.password == "2425") {
UserIdPrincipal(credentials.name)
} else {
null
}
}
}
}
Open the IDE and check the result yourself.