public class ServiceBuilder extends Object
OAuthService
Constructor and Description |
---|
ServiceBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
apiKey(String apiKey)
Configures the api key
|
T |
apiSecret(String apiSecret)
Configures the api secret
|
OAuth10aService |
build(DefaultApi10a api)
Returns the fully configured
OAuth10aService |
OAuth20Service |
build(DefaultApi20 api)
Returns the fully configured
OAuth20Service |
T |
callback(String callback)
Adds an OAuth callback url
|
void |
checkPreconditions() |
ServiceBuilder |
connectTimeout(Integer connectTimeout) |
protected OAuthConfig |
createConfig() |
T |
debug() |
T |
debugStream(OutputStream stream) |
String |
getApiKey() |
String |
getApiSecret() |
String |
getCallback() |
OutputStream |
getDebugStream() |
String |
getGrantType() |
String |
getScope() |
SignatureType |
getSignatureType() |
String |
getState() |
T |
grantType(String grantType) |
ServiceBuilder |
readTimeout(Integer readTimeout) |
T |
scope(String scope)
Configures the OAuth scope.
|
T |
signatureType(SignatureType type)
Configures the signature type, choose between header, querystring, etc.
|
T |
state(String state)
Configures the anti forgery session state.
|
public ServiceBuilder connectTimeout(Integer connectTimeout)
public ServiceBuilder readTimeout(Integer readTimeout)
protected OAuthConfig createConfig()
public T callback(String callback)
callback
- callback url. Must be a valid url or 'oob' for out of band OAuthServiceBuilder
instance for method chainingpublic T apiKey(String apiKey)
apiKey
- The api key for your applicationServiceBuilder
instance for method chainingpublic T apiSecret(String apiSecret)
apiSecret
- The api secret for your applicationServiceBuilder
instance for method chainingpublic T scope(String scope)
scope
- The OAuth scopeServiceBuilder
instance for method chainingpublic T state(String state)
state
- The OAuth stateServiceBuilder
instance for method chainingpublic T signatureType(SignatureType type)
type
- SignatureTypeServiceBuilder
instance for method chainingpublic T debugStream(OutputStream stream)
public T grantType(String grantType)
public T debug()
public void checkPreconditions()
public String getCallback()
public String getApiKey()
public String getApiSecret()
public String getScope()
public String getState()
public SignatureType getSignatureType()
public OutputStream getDebugStream()
public String getGrantType()
public OAuth10aService build(DefaultApi10a api)
OAuth10aService
api
- will build Service for this APIOAuth10aService
public OAuth20Service build(DefaultApi20 api)
OAuth20Service
api
- will build Service for this APIOAuth20Service
Copyright © 2016. All rights reserved.