Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 Authentication Error from ping() #72

Closed
peridoteagle opened this issue Jan 31, 2020 · 3 comments
Closed

401 Authentication Error from ping() #72

peridoteagle opened this issue Jan 31, 2020 · 3 comments
Labels
Milestone

Comments

@peridoteagle
Copy link

Using the username/pwd Cushion implementation suggested in the docs, I get a 401 Authentication Error from the URL I am trying to access when I ping it. It looks like this can be fixed through adding argument labels to the function.

Session Info
# function that DOES NOT work and produces authentication error later
ping <- function(cushion, as = 'list', ...) {
  check_cushion(cushion)
  sofa_GET(cushion$make_url(), as = as, args = NULL, cushion$get_headers(),
           cushion$get_auth(), ...)
}

# function that does not produce authentication error
ping <- function(cushion, as = 'list', ...) {
  check_cushion(cushion)
  sofa_GET(cushion$make_url(), as = as, args = NULL, headers = cushion$get_headers(),
           auth = cushion$get_auth(), ...)
sckott added a commit that referenced this issue Jan 31, 2020
sofa_GET args param had changed to query, using query now
explicitly pass authentication bits to auth param in sofa_GET
put guts of ping into ping method on Cushion class - ping now calls cushion ping method
@sckott
Copy link
Contributor

sckott commented Jan 31, 2020

thanks - try reinstalling remotes::install_github("ropensci/sofa"), should work now

@sckott sckott added this to the v0.4 milestone Jan 31, 2020
@peridoteagle
Copy link
Author

Can confirm that it works now. Thanks for making this change!

@sckott
Copy link
Contributor

sckott commented Jan 31, 2020

👍

@sckott sckott closed this as completed Jan 31, 2020
@sckott sckott added the bug label Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants