setApiCredentials: setApiCredentials

Description Usage Arguments Details Author(s) See Also Examples

Description

Sets the user name and secret key used to sign authenticated web requests to Synapse.

Usage

1
setApiCredentials(username, secretKey)

Arguments

username

The user's name, i.e. email address

secretKey

The secret key, retrieved from a previously authenticated session using hmacSecretKey().

Details

Setting the user name and secret key provide an alternative to logging in with a password. This authentication method does not use an expiring token (rather each request has a time-limited digital signature based on the non-expiring secret key) and is therefore useful for long running jobs.

Author(s)

Bruce Hoff

See Also

synapseLogin hmacSecretKey

Examples

1
2
3
4
5
6
7
8
## Not run: 
	synapseLogin("user.name@sagebase.org", "foo", mode="hmac")
	key <- hmacSecretKey()
	synapseLogout()
	setApiCredentials("user.name@sagebase.org", key)
	# you may now make authenticated requests to Synapse

## End(Not run)

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