Interface ServiceBuilderOAuth20
- All Superinterfaces:
ServiceBuilderCommon
- All Known Implementing Classes:
ServiceBuilder
public interface ServiceBuilderOAuth20 extends ServiceBuilderCommon
-
Method Summary
Modifier and Type Method Description ServiceBuilderOAuth20apiKey(java.lang.String apiKey)Configures the api keyServiceBuilderOAuth20apiSecret(java.lang.String apiSecret)Configures the api secretServiceBuilderOAuth20apiSecretIsEmptyStringUnsafe()Configures the api secret as "" (empty string).OAuth20Servicebuild(DefaultApi20 api)ServiceBuilderOAuth20callback(java.lang.String callback)Adds an OAuth callback urlServiceBuilderOAuth20debug()ServiceBuilderOAuth20debugStream(java.io.OutputStream debugStream)ServiceBuilderOAuth20defaultScope(ScopeBuilder scopeBuilder)ServiceBuilderOAuth20defaultScope(java.lang.String defaultScope)Configures the default OAuth 2.0 scope.
You can request any uniq scope per each access token request usingAuthorizationUrlBuilder.scope(java.lang.String).
In case you're requesting always the same scope,
you can just set it here and do not provide scope param nowhere more.ServiceBuilderOAuth20httpClient(HttpClient httpClient)takes precedence over httpClientConfigServiceBuilderOAuth20httpClientConfig(HttpClientConfig httpClientConfig)ServiceBuilderOAuth20responseType(java.lang.String responseType)ServiceBuilderOAuth20userAgent(java.lang.String userAgent)
-
Method Details
-
callback
Description copied from interface:ServiceBuilderCommonAdds an OAuth callback url- Specified by:
callbackin interfaceServiceBuilderCommon- Parameters:
callback- callback url. Must be a valid url or 'oob' (OAuthConstants.OOBfor out of band OAuth- Returns:
- the
ServiceBuilderinstance for method chaining
-
apiKey
Description copied from interface:ServiceBuilderCommonConfigures the api key- Specified by:
apiKeyin interfaceServiceBuilderCommon- Parameters:
apiKey- The api key for your application- Returns:
- the
ServiceBuilderinstance for method chaining
-
apiSecret
Description copied from interface:ServiceBuilderCommonConfigures the api secret- Specified by:
apiSecretin interfaceServiceBuilderCommon- Parameters:
apiSecret- The api secret for your application- Returns:
- the
ServiceBuilderinstance for method chaining
-
apiSecretIsEmptyStringUnsafe
ServiceBuilderOAuth20 apiSecretIsEmptyStringUnsafe()Description copied from interface:ServiceBuilderCommonConfigures the api secret as "" (empty string). Used usually for a test environments or another strange cases. Not all providers support empty string as api key and will throw an Exception in such cases.- Specified by:
apiSecretIsEmptyStringUnsafein interfaceServiceBuilderCommon- Returns:
- the
ServiceBuilderinstance for method chaining
-
httpClientConfig
- Specified by:
httpClientConfigin interfaceServiceBuilderCommon
-
httpClient
Description copied from interface:ServiceBuilderCommontakes precedence over httpClientConfig- Specified by:
httpClientin interfaceServiceBuilderCommon- Parameters:
httpClient- externally created HTTP client- Returns:
- the
ServiceBuilderinstance for method chaining
-
userAgent
- Specified by:
userAgentin interfaceServiceBuilderCommon
-
debugStream
- Specified by:
debugStreamin interfaceServiceBuilderCommon
-
debug
ServiceBuilderOAuth20 debug()- Specified by:
debugin interfaceServiceBuilderCommon
-
responseType
-
defaultScope
Configures the default OAuth 2.0 scope.
You can request any uniq scope per each access token request usingAuthorizationUrlBuilder.scope(java.lang.String).
In case you're requesting always the same scope,
you can just set it here and do not provide scope param nowhere more.- Parameters:
defaultScope- The OAuth scope, used as deafult- Returns:
- the
ServiceBuilderinstance for method chaining
-
defaultScope
-
build
-