Skip to content

Commit

Permalink
Merge pull request #129 from Open-EO/fix-128
Browse files Browse the repository at this point in the history
Fix problems when authentication provider is missing #128
  • Loading branch information
flahn authored Aug 18, 2022
2 parents 3c17ead + 755654a commit 2f12153
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
inst/doc
/doc/
/Meta/
/CRAN-RELEASE
/cran-comments.md
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: openeo
Type: Package
Title: Client Interface for 'openEO' Servers
Version: 1.2.1
Version: 1.2.1.9000
Authors@R: c(
person(given="Florian", family="Lahn", email = "florian.lahn@eftas.com", role = c("aut", "cre")),
person(given=c("Peter","James"),family = "Zellner", email="peterjames.zellner@eurac.edu",role=c("ctb")),
Expand Down
10 changes: 6 additions & 4 deletions R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,13 @@ OpenEOClient <- R6Class(
else {
if (is.null(provider)) {
providers = list_oidc_providers()
provider = providers[[1]]
if (is_null(provider)) {
message("Either a provider needs to be provided, or a username and password for basic authentication.")
return(invisible(self))

# if it happens to be that the oidc provider list is empty then use a more meaningful error message
if (length(providers) == 0) {
stop("OIDC provider list from 'list_oidc_providers()' is empty. Please contact the back-end provider.")
#
}
provider = providers[[1]]
}
private$loginOIDC(provider = provider, config = config)
}
Expand Down
14 changes: 0 additions & 14 deletions cran-comments.md

This file was deleted.

0 comments on commit 2f12153

Please sign in to comment.