sessionToken: Refresh the Auth Service Session Token

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Resets the counter in the Synapse auth service that determines when the token expires.

Usage

1
2
sessionToken(sessionToken, checkValidity = FALSE, refreshDuration = .getCache("sessionRefreshDurationMin"))
refreshSessionToken(sessionToken)

Arguments

sessionToken

Session token returned by the Synapse auth service

checkValidity

boolean indicating whether the session token's validity should be checked before setting it in the memory cache and before returning it to the caller

refreshDuration

duration that should be allowed to elapse before refreshing the session token

Value

refreshSessionToken has no return value, but is called for it's side-effects. The first side effect is that the expiration counter maintained by the Synapse auth service is reset. The second is that the local timestamp cache value is reset.

sessionToken returns the current value of the session token. If the user is not logged in to Synapse, the function returns an empty string.

Note

This function will throw an exception if the session token is invalid or is already expired. Also, this method is for internal use only.

Author(s)

Matt Furia

See Also

synapseLogin

Examples

1
2
3
4
5
6
7
## Not run:
## Not run: 
synapseLogin('demouser@sagebase.org','demouser-pw')
refreshSessionToken(sessionToken())

## End(Not run)
## End (Not run)

Sage-Bionetworks/rSynapseClientRewrite documentation built on May 9, 2019, 7:06 p.m.