public interface BellaDatiConnection extends Serializable
BellaDatiService
instance.
The same connection may be used to log in as multiple users, even in
parallel.
Connection instances may be serialized, saved, and restored for later use
with the same server. This will instantiate a new HTTP client.Modifier and Type | Method and Description |
---|---|
OAuthRequest |
oAuth(String consumerKey,
String consumerSecret)
Initiates OAuth authentication by requesting a request token from the
BellaDati server.
|
OAuthRequest |
oAuth(String consumerKey,
String consumerSecret,
String redirectUrl)
Initiates OAuth authentication by requesting a request token from the
BellaDati server.
|
BellaDatiService |
xAuth(String consumerKey,
String consumerSecret,
String username,
String password)
Authenticates to the BellaDati server using xAuth.
|
OAuthRequest oAuth(String consumerKey, String consumerSecret) throws ConnectionException, AuthorizationException
consumerKey
- the consumer key configured in your BellaDati domainconsumerSecret
- the consumer secret configured in your BellaDati
domainConnectionException
- if connection to the server failsAuthorizationException
- if something went wrong during
authentication, check
AuthorizationException.getReason()
for detailsOAuthRequest oAuth(String consumerKey, String consumerSecret, String redirectUrl) throws IllegalArgumentException, ConnectionException, AuthorizationException
After authorization, BellaDati redirects the user to the given URL. This needs to be a valid URL.
consumerKey
- the consumer key configured in your BellaDati domainconsumerSecret
- the consumer secret configured in your BellaDati
domainredirectUrl
- BellaDati will redirect the user to this URL after
successful authorizationIllegalArgumentException
- if the redirect URL is not a valid URLConnectionException
- if connection to the server failsAuthorizationException
- if something went wrong during
authentication, check
AuthorizationException.getReason()
for detailsBellaDatiService xAuth(String consumerKey, String consumerSecret, String username, String password) throws ConnectionException, AuthorizationException
consumerKey
- the consumer key configured in your BellaDati domainconsumerSecret
- the consumer secret configured in your BellaDati
domainusername
- username of the user logging inpassword
- password of the user logging inConnectionException
- if connection to the server failsAuthorizationException
- if something went wrong during
authentication, check
AuthorizationException.getReason()
for detailsCopyright © 2014. All rights reserved.