Passwords: Change, check, or reset passwords

PasswordsR Documentation

Change, check, or reset passwords

Description

These functions allow Users to change their password or (for superusers) other Users' passwords, to check a username/password combination, to generate a random password, or (for superusers) to send a password reset email to a User.

Usage

changePassword(
  username = getOption("GeneHive.username"),
  random = TRUE,
  netrc.file = getOption("GeneHive.netrc.file"),
  verbose = getOption("GeneHive.verbose")
)

checkPassword(username = getOption("GeneHive.username"), password)

randomPassword(nchars = 20)

resetPassword(username, prefix, verbose = getOption("GeneHive.verbose"))

Arguments

username

A character string containing the name of the User; defaults to getOption("GeneHive.username")

random

A logical value specifying whether a random password should be generated; defaults to TRUE. If available, /dev/urandom is used to generate random passwords; otherwise, sample is used.

netrc.file

A character string specifying the location of the .netrc file

verbose

A logical value specifying whether messages should be printed

password

A character string containing the password that will be checked for a User

nchars

The length of the password to be generated, in characters

prefix

An optional character string containing the URL prefix of a landing page to use in email template. This will have "?user={user}&token={token}" appended in the actual template. If this is absent, then the template for direct API use will be sent instead of the template linking to a landing page.

Value

changePassword

TRUE (invisibly) if the password was successfully changed; otherwise, the function terminates with an error.

checkPassword

TRUE if the username and password are valid, FALSE otherwise.

randomPassword

The password (invisibly).

resetPassword

The HTTP response body of the request (invisibly).

Author(s)

Adam C. Gower agower@bu.edu


agower/GeneHive documentation built on April 14, 2022, 5:08 a.m.