loginToDATIMOAuth: datimutils::loginToDATIMOAuth(base_url =...

View source: R/loginToDATIM.R

loginToDATIMOAuthR Documentation

datimutils::loginToDATIMOAuth(base_url = Sys.getenv("BASE_URL"), token = token, app = oauth_app, api = oauth_api, redirect_uri= APP_URL, scope = oauth_scope, d2_session_envir = parent.env(environment()))

Description

datimutils::loginToDATIMOAuth(base_url = Sys.getenv("BASE_URL"), token = token, app = oauth_app, api = oauth_api, redirect_uri= APP_URL, scope = oauth_scope, d2_session_envir = parent.env(environment()))

Usage

loginToDATIMOAuth(
  base_url = NULL,
  token = NULL,
  redirect_uri = NULL,
  app = NULL,
  api = NULL,
  scope = NULL,
  d2_session_name = "d2_default_session",
  d2_session_envir = parent.frame()
)

Arguments

base_url

URL of the DHIS2 server

token

An OAUTH2.0 token object. Will be created if not supplied.

redirect_uri

The redirect URI which should be used after successful authentication with the server.

app

An httr OAUTH app object.

api

An hjttr OAUTH endpoint.

scope

A character vector of scopes which should be requested.

d2_session_name

the variable name for the d2Session object. The default name is d2_default_session and will be used by other datimutils functions by default when connecting to datim. Generally a custom name should only be needed if you need to log into two seperate DHIS2 instances at the same time. If you create a d2Session object with a custom name then this object must be passed to other datimutils functions explicitly

d2_session_envir

the environment in which to place the R6 login object, default is the immediate calling environment


pepfar-datim/datimutils documentation built on Nov. 20, 2023, 7:58 a.m.