authenticate: Authenticate with the 'Via Foundry' API

View source: R/auth.R

authenticateR Documentation

Authenticate with the 'Via Foundry' API

Description

Authenticates the user with the 'Via Foundry' API using their username and password. Retrieves a bearer token and saves it along with the hostname to a configuration file.

Usage

authenticate(
  hostname,
  username = NULL,
  password = NULL,
  identity_type = 1,
  redirect_uri = "http://localhost",
  config_path = DEFAULT_CONFIG_PATH,
  overwrite = FALSE
)

Arguments

hostname

The API 'hostname' (e.g., 'https://your_viafoundry').

username

The login username.

password

The login password (optional; will prompt if not provided).

identity_type

The identity type (default is 1).

redirect_uri

The redirect 'URI' (default is 'http://your_viafoundry/redirect').

config_path

Path to save the configuration file (default is '~/.viaenv').

overwrite

Logical flag to overwrite the existing configuration file (default is FALSE).

Value

None. Saves the bearer token to the configuration file and sets the global config path.


viafoundry documentation built on April 4, 2025, 12:35 a.m.