Authorize ROhdsiWebApi to access a protected instance of WebAPI Authorize the ROhdsiWebApi package to access WebApi on behalf of the user. This can be done with any of the auth methods described below. authorizeWebApi will use attempt to retrieve, cache, and update a token which will grant access to webAPI by all subsequent requests made by the package.

authorizeWebApi(
  baseUrl,
  authMethod,
  webApiUsername = NULL,
  webApiPassword = NULL
)

Arguments

baseUrl

The base URL for the WebApi instance, for example: "http://server.org:80/WebAPI".

authMethod

The method used for authentication to WebAPI. Options are

  • "db"Database authentication using Atlas/WebAPI built in auth

  • "ad"Active Directory

  • "windows"Windows NT authentication

The auth method must be enabled in the instance of WebAPI pointed to by baseUrl.

webApiUsername

A character string containing the WebApi username passed on to authentication methods

webApiPassword

An character string containing a WebApi password passed on to authentication methods. By default the user will be prompted for their password when needed.