askpass {askpass} | R Documentation |
Password Prompt Utility
Description
Prompt the user for a password to authenticate or read a protected key.
By default, this function automatically uses the most appropriate method
based on the user platform and front-end. Users or IDEs can override this
and set a custom password entry function via the askpass
option.
Usage
askpass(prompt = "Please enter your password: ")
Arguments
prompt |
the string printed when prompting the user for input. |
Details
By default askpass()
returns NULL
in non-interactive sessions.
(These include knitr runs and testthat tests.)
If you want to force a password prompt in non-interactive sessions,
set the rlib_interactive
option to TRUE
:
options(rlib_interactive = TRUE)
Examples
# Prompt user for passwd
pw <- askpass("Please enter your password")
[Package askpass version 1.2.0 Index]