Skip to content

Support for viewer based credentials on Posit Connect #274

@brooklynbagel

Description

@brooklynbagel

Posit Connect recently added support for OAuth integrations and the ability to roll your own custom integration. The upshot is an Shiny application could have access to the same files in Box that a viewer of that app does. Currently {boxr} does not have to a way to take advantage of this capability with the Box OAuth credential stored in the R session global options object, limiting it to one credential per session. I've been experimenting with adding this to {boxr} (it's experimental at the moment and not yet ready for a PR at the time of creating this issue) As far as I can tell there four distinct paths to implement this functionality:

  1. Use the {connectcreds} package that provides utilities for taking advantage of Posit Connect's viewer based credentials. This is the approach my experiment has taken, although it requires some additional code to create an httr::Token2.0 object.
  2. Use connectapi::get_oauth_credentials. Needs investigation w.r.t. if any work is required to make an httr::Token2.0 object. It will also be some additional work in order for {boxr} to know it is being run in Shiny on Posit Connect that {connectcreds} makes easier.
  3. Do not add any additional libraries and make the API call to Posit Connect to get an OAuth credential using {httr}. Like the above it will need some code for boxr to determine it being used in Shiny on Connect.
  4. Use {connectcreds} and upgrade from the superseded {httr} to {httr2}. This would probably be the most work and IMO makes sense to make into a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions