login: Create and destroy a login token

login_openbisR Documentation

Create and destroy a login token

Description

Login tokens for openBIS API calls can be created using login_openbis(). If the auto_disconnect option is enabled, the user is automatically logged out using logout_openbis() upon garbage collection of the token. The validity of a token can be checked using is_token_valid() and a login token can be manually destroyed by calling logout_openbis() on the token.

Usage

login_openbis(user = "rdgr2014", pwd = "IXPubReview",
  host_url = "https://infectx.biozentrum.unibas.ch",
  auto_disconnect = TRUE, ...)

logout_openbis(token, ...)

is_token_valid(token, ...)

Arguments

user, pwd

Login credentials for an openBIS instance.

host_url

Host url.

auto_disconnect

Logical switch for automatically closing the connection upon garbage collection of the token.

...

Further arguments are forwarded to make_request().

token

Login token as created by login_openbis().

Value

A login token as returned by login_openbis() is a character vector and logout_openbis() returns NULL invisibly while is_token_valid() returns a logical flag.

openBIS

  • \Sexpr[results=rd]{infx::docs_link("gis", "tryToAuthenticateForAllServices")}
  • \Sexpr[results=rd]{infx::docs_link("gis", "logout")}
  • \Sexpr[results=rd]{infx::docs_link("gis", "isSessionActive")}

See Also

Other utility functions: api_url, make_requests

Examples


  # create a login token
  tok <- login_openbis()
  # check token
  is_token_valid(tok)

  # destroy token
  logout_openbis(tok)
  # token is no longer valid
  is_token_valid(tok)



nbenn/infx documentation built on May 20, 2022, 7:44 a.m.