Package com.twitter.clientlib.auth
Class OAuth
- java.lang.Object
-
- com.twitter.clientlib.auth.OAuth
-
- All Implemented Interfaces:
Authentication
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class OAuth extends Object implements Authentication
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyToParams(List<Pair> queryParams, Map<String,String> headerParams, Map<String,String> cookieParams, String payload, String method, URI uri)
Apply authentication settings to header and query params.com.github.scribejava.core.model.OAuth2AccessToken
getAccessToken()
com.github.scribejava.core.model.OAuth2AccessToken
obtainAccessToken(String refreshToken)
com.github.scribejava.core.model.OAuth2AccessToken
renewAccessToken()
OAuth
setAccessToken(com.github.scribejava.core.model.OAuth2AccessToken accessToken)
OAuth
setAccessToken(String accessToken)
void
setBasePath(String basePath)
OAuth
setCredentials(String clientId, String clientSecret, Boolean debug)
OAuth
setFlow(OAuthFlow flow)
OAuth
setScope(String scope)
OAuth
useAuthorizationCodeFlow(String code)
OAuth
usePasswordFlow(String username, String password)
-
-
-
Method Detail
-
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String,String> headerParams, Map<String,String> cookieParams, String payload, String method, URI uri) throws ApiException
Description copied from interface:Authentication
Apply authentication settings to header and query params.- Specified by:
applyToParams
in interfaceAuthentication
- Parameters:
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspayload
- HTTP request bodymethod
- HTTP methoduri
- URI- Throws:
ApiException
- if failed to update the parameters
-
renewAccessToken
public com.github.scribejava.core.model.OAuth2AccessToken renewAccessToken() throws ApiException
- Throws:
ApiException
-
obtainAccessToken
public com.github.scribejava.core.model.OAuth2AccessToken obtainAccessToken(String refreshToken) throws ApiException
- Throws:
ApiException
-
getAccessToken
public com.github.scribejava.core.model.OAuth2AccessToken getAccessToken()
-
setAccessToken
public OAuth setAccessToken(com.github.scribejava.core.model.OAuth2AccessToken accessToken)
-
setBasePath
public void setBasePath(String basePath)
-
-