Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

debugging authentication #1

@cboettig

Description

@cboettig

Getting a cryptic error message on authentication, not sure why. I have the function:

ROAuth_figshare <- function(cKey = getOption("FigshareKey", stop("Missing Figshare consumer key")),
    cSecret = getOption("FigsharePrivateKey", stop("Missing Figshare app secret")),
    curl = getCurlHandle(), ...) {
    reqURL <-  "http://api.figshare.com/v1/pbl/oauth/request_token"
    accessURL <- "http://api.figshare.com/v1/pbl/oauth/access_token"
    authURL <- "https://api.figshare.com/v1/pbl/oauth/authorize" 
    cred <- OAuthFactory$new(cKey, cSecret, reqURL, accessURL, authURL)
    cred$handshake()
}

I store my keys in the options as indicated, and run the function, which throws this error:

> require(ROAuth)
> cred <- ROAuth_figshare()
Error in function (value)  : 
  invalid replacement for field 'needsVerifier', should be from class "logical" or a subclass (was class "character")

Enter a frame number, or 0 to exit   

1: ROAuth_figshare()
2: #7: OAuthFactory$new(cKey, cSecret, reqURL, accessURL, authURL)
3: methods::new(def, ...)
4: initialize(value, ...)
5: initialize(value, ...)
6: .Object$initialize(...)
7: ROauth.R#17: function (value) 
{
    if (missing(value)) 
        `.->needsVer

What did I miss? (I would ask on duncantl 's fork but forks don't have issues trackers)
Figshare API documentation is here: http://api.figshare.com/docs/intro.html#authentication

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions