Skip to content

Implement refresh for Gargle2.0 #79

@jennybc

Description

@jennybc

I don't think we can just inherit this from Token2.0 because removing a token from the cache is different for Gargle2.0 tokens. This is also not going to come up very often, i.e. is not urgent, but is worth doing.

relevant excerpt from httr::Token2.0:

  refresh = function() {
    cred <- refresh_oauth2.0(self$endpoint, self$app,
        self$credentials, self$params$user_params, self$params$use_basic_auth)
    if (is.null(cred)) {
      remove_cached_token(self)   # <-- this won't actually un-cache a Gargle2.0 token
    } else {
      self$credentials <- cred
      self$cache()
    }
    self
  },

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