Every exam attempt is tied to a single user. The exam document format does not determine the user, but invokes the authentication provider configured with exam_config() to determine the user's identification.



the shiny session object.


a list with user information. The list must contain an element user_id with the user's unique identifier as character (it will be forcefully cast to character). The user object may also contain the following


a character string which will be displayed for grading. If missing, the user id is displayed for grading.


if TRUE, the user has permissions to grade attempts.

The user object can optionally include any number of additional entries which will be stored alongside the exam data. Warning: this could pose serious privacy issues. Either don't add additional information or ensure the data is stored encrypted and secure.

Any additional information will be proxied to all callback functions receiving a user object.

See also

rsconnect_auth() for an authentication provider using the user information from RStudio Connect.

password_auth() and ui_token_auth() for authentication providers displaying a login user interface before the exam begins.

Other access configuration: configure_attempts(), password_auth(), rsconnect_auth()


# Use a "dummy" authentication provider which assigns everyone the same user id # and does not allow anyone to grade submitted attempts. exam_config(auth_provider = function (session) { return(list( user_id = "E-L", display_name = "Eager Learner", grading = FALSE )) })