Trying to pass on RStudio connect API key using plumber

January 8, 2020 @gordon Gordon Shotwell

@gordon wrote:

I'm trying to build a plumber API that uses a key provided in req$HTTP_AUTHORIZATION to access pinned data, but it seems like this information is not available when plumber is hosted on Rstudio connect.

Works locally but returns an empty list from Connect:

function(req) {
  return(req$HTTP_AUTHORIZATION)
}

Works on Connect

function(req) {
     return(req$postBody)
}

Raises an exception on Connect:

function(req) {
     return(as.list(req))
}

I'm assuming what's happening here is that the authorization is being suppressed by Connect which makes sense, but I'm wondering if this behaviour is documented anywhere? Is the best method for this kind of workflow to encrypt the key and send it as part of the body?

Posts: 4

Participants: 3

Read full topic

Previous Article
RStudio Connect API report who can view the app
RStudio Connect API report who can view the app

@shannon.lewis wrote: I have been looking over the RStudio Connect API, but i'm ...

Next Article
Unable to login to rstudio-server started by another user that is not a root user in a docker container.
Unable to login to rstudio-server started by another user that is not a root user in a docker container.

@pulah_dhandekar wrote: Hello, I am trying to create multiple users and start rs...