module-authentication {shinydbauth}R Documentation

Authentication module

Description

Authentication module

Usage

auth_ui(
  id,
  status = "primary",
  tags_top = NULL,
  tags_bottom = NULL,
  background = NULL,
  choose_language = NULL,
  lan = NULL,
  ...
)

auth_server(
  input,
  output,
  session,
  check_credentials,
  use_token = FALSE,
  lan = NULL
)

Arguments

id

Module's id.

status

Bootstrap status to use for the panel and the button. Valid status are: "default", "primary", "success", "warning", "danger".

tags_top

A tags (div, img, ...) to be displayed on top of the authentication module.

tags_bottom

A tags (div, img, ...) to be displayed on bottom of the authentication module.

background

A optionnal css for authentication background. See example.

choose_language

logical/character. Add language selection on top ? TRUE for all supported languages or a vector of possibilities like c("en", "es"). If enabled, input$shinydbauth_language is created

lan

A language object. See use_language

...

: Used for old version compatibility.

input, output, session

Standard Shiny server arguments.

check_credentials

Function with two arguments (user, the username provided by the user and password, his/her password). Must return a list with at least 2 (or 4 in case of sqlite) slots :

  • result : logical, result of authentication.

  • user_info : list. What you want about user ! (sqlite : the line in db corresponding to the user).

  • expired : logical, is user has expired ? Always FALSE if db doesn't have a expire column. Optional.

  • authorized : logical, is user can access to his app ? Always TRUE if db doesn't have a applications column. Optional.

use_token

Add a token in the URL to check authentication. Should not be used directly.

Value

A reactiveValues with 3 slots :


[Package shinydbauth version 1.0.0.1 Index]