if (FALSE) {
#### The below examples illustrate the different ways to login in opal ####
# explicite username/password login
o <- opal.login(username = 'administrator', password = 'password',
url = 'https://opal-demo.obiba.org')
opal.logout(o)
# explicite personal access token login
o <- opal.login(token = 'HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
url = 'https://opal-demo.obiba.org')
opal.logout(o)
# login using options and user credentials
options(opal.username = 'administrator',
opal.password = 'password',
opal.url = 'https://opal-demo.obiba.org')
o <- opal.login()
opal.logout(o)
# login using options and personal access token
options(opal.token = 'HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
opal.url = 'https://opal-demo.obiba.org')
o <- opal.login()
opal.logout(o)
# login using ssl key pair
options(opal.opts = list(
sslcert = 'my-publickey.pem',
sslkey = 'my-privatekey.pem'))
o <- opal.login(url = 'https://opal-demo.obiba.org')
opal.logout(o)
# login with a R server profile
o <- opal.login(username = 'administrator', password = 'password',
url = 'https://opal-demo.obiba.org', profile = 'default')
opal.logout(o)
}
Run the code above in your browser using DataLab