forked from Sage-Bionetworks/rSynapseClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetApiCredentials.Rd
41 lines (39 loc) · 1.06 KB
/
setApiCredentials.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
\name{setApiCredentials}
\alias{setApiCredentials}
\title{
setApiCredentials
}
\description{
Sets the user name and secret key used to sign authenticated web requests to Synapse.
}
\usage{
setApiCredentials(username, secretKey)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{username}{
The user's name, i.e. email address
}
\item{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{
Bruce Hoff
}
\seealso{
\code{\link{synapseLogin}}
\code{\link{hmacSecretKey}}
}
\examples{
synapseLogin("[email protected]", "foo", mode="hmac")
key <- hmacSecretKey()
synapseLogout()
setApiCredentials("[email protected]", key)
# you may now make authenticated requests to Synapse
}