Skip to content

Commit

Permalink
a little more documentation for sanitize_token()
Browse files Browse the repository at this point in the history
To reflect @jmbarbone's modifications in #347 & #348

Update NEWS.md
  • Loading branch information
wibeasley committed Jul 22, 2021
1 parent 29af336 commit ddfc3e0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
10 changes: 5 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Upcoming Versions
==========================================================

### Minor Enhacements
### Minor Enhancements

* `sanitize_token()` no longer fails with lowercase characters (#347)
* `sanitize_token()` now allows lowercase characters --in addition to uppercase characters & digits (#347, @jmbarbone)

Version 1.0 (released 2021-07-21)
Version 1.0.0 (released 2021-07-21)
==========================================================

The package has been stable for years and should be reflected in the major version number.
Expand Down Expand Up @@ -33,7 +33,7 @@ The package has been stable for years and should be reflected in the major versi
* Accepts more than one `config_option` element. (Proposed by @BastienRance, #307)
* Fixed calculation of `success` value returned by `redcap_read()` and `redcap_write()` when the parameter `continue_on_error` is true. (Bug found by @llrs, #317)

Version 0.11 (Released 2020-04-20)
Version 0.11.0 (Released 2020-04-20)
==========================================================

### Breaking Changes (possible, but unlikely)
Expand Down Expand Up @@ -70,7 +70,7 @@ Version 0.11 (Released 2020-04-20)

* Allow more than one `httr::config()` parameter to be passed (Thanks @BastienRance, #307).

Version 0.10 (Released 2019-09-22)
Version 0.10.2 (Released 2019-09-22)
==========================================================

### Minor New Features
Expand Down
8 changes: 6 additions & 2 deletions R/sanitize-token.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#'
#' @description Verifies the token is nonmissing and conforms to the legal
#' pattern of a 32-character hexadecimal value.
#' Trailing line endings are removed.
#' Each character must be an (a) digit 0-9, (b) uppercase letter A-F, or
#' (c) lowercase letter a-f.
#' #' Trailing line endings are removed.
#'
#' @param token The REDCap token. Required.
#'
Expand All @@ -11,13 +13,15 @@
#' @note Contact your institution's REDCap administrator for more information
#' about your project-specific token.
#'
#' @author Hao Zhu, Benjamin Nutter, Will Beasley
#' @author Hao Zhu, Benjamin Nutter, Will Beasley, Jordan Mark Barbone
#'
#' @examples
#' secret_token_1 <- "12345678901234567890123456ABCDEF"
#' secret_token_2 <- "12345678901234567890123456ABCDEF\n"
#' secret_token_3 <- "12345678901234567890123456abcdef"
#' REDCapR::sanitize_token(secret_token_1)
#' REDCapR::sanitize_token(secret_token_2)
#' REDCapR::sanitize_token(secret_token_3)

#' @export
sanitize_token <- function(token) {
Expand Down
8 changes: 6 additions & 2 deletions man/sanitize_token.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ddfc3e0

Please sign in to comment.