Creates a Viya session object to be used in other calls

session(
  hostname,
  username = NULL,
  password = NULL,
  client_id = NULL,
  client_secret = NULL,
  oauth_token = NULL,
  authinfo = NULL,
  auth_code = FALSE,
  verbose = FALSE,
  verify_ssl = TRUE,
  cacert = NULL,
  openBrowser = TRUE,
  platform = TRUE
)

Arguments

hostname

string, SAS Viya url

username

string, username for login

password

string, username password

client_id

string, client_id used for authentication, if left blank will use default

client_secret

string, client_secret used for authentication, if left blank will use default

oauth_token

string, if Oauth token is provided, a viya_connection is created

authinfo

A character string that specifies an alternative path to a .authinfo file that is used for authentication. By default, ~/.authinfo is used on Linux and %HOMEDRIVE% or \%HOMEPATH%\_authinfo is used on Windows.

auth_code

logical, if TRUE will open a browser with the user and request the authentication code to continue the authentication process. Viya 2022+ only.

verbose

logical, return print API call information

verify_ssl

boolean, verify SSL (Use it with caution)

cacert

ca certificate list

openBrowser

boolean, if TRUE the browser be opened automatically when auth_code = TRUE

platform

logical, make a get call to get platform information (release, OS, siteName)

Value

viya_connection class object

See also

Other authentication: oauth_consul(), refresh_session()

Examples


if (FALSE) { # \dontrun{
sess <- session(hostname = "http://myserver.com",
         username = "myuser",
         password = "mysecret")
} # }