Checks user credentials against a PostgreSQL database using a configured connection and specific authentication criteria.
This function is designed to be used in conjunction with login systems in Shiny applications, enabling secure user verification.
Usage
check_creds(
sepe_datalake,
seed,
session,
tabela = "app_usuarios",
showbusy = FALSE
)
Arguments
- sepe_datalake
A list containing database connection information (server, user, password, etc.).
- seed
Additional seed information, if necessary for encryption logic.
- session
Shiny session object, used to access specific user session data.
- tablea
Postgres/GreenPlum user table used
Value
An anonymous function that accepts 'user' (username) and 'password', connects to the database, verifies the credentials,
and returns a list indicating if the login was successful and additional user information.
Examples
if (FALSE) { # \dontrun{
# Example usage within a Shiny server function
creds_checker <- check_creds(sepe_datalake, seed, session)
result <- creds_checker(user = input$username, password = input$password)
if (result$result) {
# Handle successful login
} else {
# Handle failed login
}
} # }