Let httr2 take care of token refreshing
Change-Id: I68f35fa8debb9603e937c4a12328560ac31f61a1
diff --git a/man/KorAPConnection-class.Rd b/man/KorAPConnection-class.Rd
index 4c75799..55b88cd 100644
--- a/man/KorAPConnection-class.Rd
+++ b/man/KorAPConnection-class.Rd
@@ -18,6 +18,8 @@
apiVersion = "v1.0",
apiUrl,
accessToken = getAccessToken(KorAPUrl),
+ oauthClient = NULL,
+ oauthScope = "search match_info",
userAgent = "R-KorAP-Client",
timeout = 240,
verbose = FALSE,
@@ -76,7 +78,16 @@
IDS, because of the special license situation. This concerns also cached
results which do not take into account from where a request was issued. If
you experience problems or unexpected results, please try \code{kco <- new("KorAPConnection", cache=FALSE)} or use
-\code{\link[=clearCache]{clearCache()}} to clear the cache completely.}
+\code{\link[=clearCache]{clearCache()}} to clear the cache completely.
+
+An alternative to using an access token is to use a browser-based oauth2 workflow
+to obtain an access token. This can be done with the \code{\link[=auth]{auth()}} method.}
+
+\item{oauthClient}{OAuth2 client object.}
+
+\item{oauthScope}{OAuth2 scope.}
+
+\item{authorizationPossible}{logical that indicates if authorization is possible/necessary for the current KorAP instance. Automatically set during initialization.}
\item{userAgent}{user agent string.}
@@ -119,6 +130,10 @@
\item{\code{accessToken}}{OAuth2 access token.}
+\item{\code{oauthClient}}{OAuth2 client object.}
+
+\item{\code{oauthScope}}{OAuth2 scope.}
+
\item{\code{userAgent}}{user agent string used for connection the API.}
\item{\code{timeout}}{tineout in seconds for API requests (this does not influence server internal timeouts)}
diff --git a/man/auth-KorAPConnection-method.Rd b/man/auth-KorAPConnection-method.Rd
index ff41b6b..cf06c01 100644
--- a/man/auth-KorAPConnection-method.Rd
+++ b/man/auth-KorAPConnection-method.Rd
@@ -5,13 +5,20 @@
\alias{auth}
\title{Authorize RKorAPClient}
\usage{
-\S4method{auth}{KorAPConnection}(kco, app_id = generic_kor_app_id, scope = "search match_info")
+\S4method{auth}{KorAPConnection}(
+ kco,
+ app_id = generic_kor_app_id,
+ app_secret = NULL,
+ scope = kco@oauthScope
+)
}
\arguments{
\item{kco}{KorAPConnection object}
\item{app_id}{OAuth2 application id. Defaults to the generic KorAP client application id.}
+\item{app_secret}{OAuth2 application secret. Used with confidential client applications. Defaults to \code{NULL}.}
+
\item{scope}{OAuth2 scope. Defaults to "search match_info".}
}
\value{