Skip to contents

xMart4 access tokens can be generated to access marts either through using a WHO WIMS account or using pre-configured Azure client ID and secret. The package automatically manages the tokens behind the scenes for you, so unless you need to test multiple client access in a single R session, you do not need to manually create tokens. More detailed instructions can be found on the xmart4 package GitHub page.

Usage

xmart4_token(
  auth_type = "client",
  use_cache = TRUE,
  client_id = NULL,
  client_secret = NULL,
  xmart_server = c("UAT", "PROD")
)

Arguments

auth_type

Type of authorization to use for the token authorization. If "client" (the default), it uses an AzureAD client setup. The old "wims" method has been discontinued.

use_cache

Use Azure cache if TRUE (default), otherwise bypass cache.

client_id

Azure client ID. Only required if auth_type == 'client'.

client_secret

Azure client secret. Only required if auth_type == 'client'.

xmart_server

Either 'UAT' (the default) or 'PROD'

Value

List with two values, token and time of expiration, which is 60 minutes from time of generation.

Details

For more details on the WIMS and client methods of authentication, see their relevant vignettes: