Skip to content

Commit

Permalink
Remove package check and style tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Dec 17, 2015
1 parent 4d7cea3 commit 11f8b66
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion .travis.yml
@@ -1,7 +1,6 @@
language: r

r_github_packages:
- s-u/PKI
- jimhester/covr
- jeroenooms/curl

Expand Down
4 changes: 2 additions & 2 deletions R/hmac.r
Expand Up @@ -7,9 +7,9 @@
#' @keywords internal
#' @export
hmac_sha1 <- function(key, string) {
if(is.character(string))
if (is.character(string))
string <- charToRaw(paste(string, collapse = "\n"))
if(is.character(key))
if (is.character(key))
key <- charToRaw(paste(key, collapse = "\n"))
hash <- openssl::sha1(string, key = key)
openssl::base64_encode(hash)
Expand Down
3 changes: 0 additions & 3 deletions R/oauth-server-side.R
Expand Up @@ -27,9 +27,6 @@ init_oauth_service_account <- function(endpoint, secrets, scope = NULL) {
#' jwt_signature(cred, "https://www.googleapis.com/auth/userinfo.profile")
#' }
jwt_signature <- function(credentials, scope, duration = 60 * 60) {
if (!requireNamespace("openssl", quietly = TRUE)) {
stop("Package 'openssl' required for JWT signing", call. = FALSE)
}
now <- as.numeric(Sys.time())
cs <- jwt_claimset(credentials$client_email, scope, iat = now,
exp = now + duration)
Expand Down

0 comments on commit 11f8b66

Please sign in to comment.