authentication | R Documentation |
Interact with authentication endpoints. Every call to the Cytobank API must be accompanied by an authentication token. Tokens should be kept secure as they confer access to the data and analyses of an account. Tokens expire after 8 hours by default but this figure my change depending on custom configurations of an Enterprise Cytobank.
authenticate(
site,
username = NA,
password = NA,
auth_token = NA,
short_timeout = 30,
long_timeout = 60,
timeout = 30
)
## S4 method for signature 'UserSession'
authentication.logout(UserSession, timeout = UserSession@short_timeout)
## S4 method for signature 'UserSession'
authentication.revoke_all_tokens(
UserSession,
timeout = UserSession@short_timeout
)
## S4 method for signature 'UserSession'
authentication.revoke_all_tokens_user(
UserSession,
user_id,
timeout = UserSession@short_timeout
)
site |
character representing Cytobank user's site, as in 'site'.cytobank.org. If your Cytobank server does not end in '.org', enter the entire server name, as in 'site.cytobank.cn'. |
username |
character representing Cytobank user's username or email |
password |
character representing Cytobank user's password |
auth_token |
character representing Cytobank user's authentication token (expires in 8 hours) |
short_timeout |
numeric representing short request timeout times (default = 30s) [optional] |
long_timeout |
numeric representing long request timeout times (default = 60s) [optional] |
timeout |
integer representing the request timeout time in seconds [optional] |
UserSession |
Cytobank UserSession object |
user_id |
integer representing Cytobank user's ID |
authenticate
Authenticate a Cytobank user and return a
Cytobank UserSession object that is passed to all other Cytobank API
endpoints.
authentication.logout
This function has been deprecated. Logout a Cytobank user.
authentication.revoke_all_tokens
This function has been deprecated. Invalidate all existing tokens for the user making this call.
authentication.revoke_all_tokens_user
This function has been deprecated. Revoke all tokens for a given user. This endpoint only works for admins of the Cytobank site being accessed.
## Not run: # Authenticate via username/password
cyto_session <- authenticate(site="premium", username="cyril_cytometry",
password="cytobank_rocks!") # Authenticate via auth_token
cyto_session <- authenticate(site="premium", auth_token="my_secret_auth_token")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.