sanitize_token: Validate and sanitize the user's REDCap token.

Description Usage Arguments Value Note Author(s) Examples

View source: R/sanitize-token.R

Description

Verifies the token is nonmissing and conforms to the legal pattern of a 32-character hexadecimal value. Trailing line endings are removed.

Usage

1

Arguments

token

The REDCap token. Required.

Value

The token, without a terminal newline character.

Note

Contact your institution's REDCap administrator for more informationa about your project-specific token.

Author(s)

Hao Zhu, Benjamin Nutter, Will Beasley

Examples

1
2
3
4
5
library(REDCapR) #Load the package into the current R session.
secret_token_1 <- "12345678901234567890123456ABCDEF"
secret_token_2 <- "12345678901234567890123456ABCDEF\n"
sanitize_token(secret_token_1)
sanitize_token(secret_token_2)

REDCapR documentation built on May 29, 2017, 9:24 a.m.