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 voidapplyToParams(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.OAuth2AccessTokengetAccessToken()com.github.scribejava.core.model.OAuth2AccessTokenobtainAccessToken(String refreshToken)com.github.scribejava.core.model.OAuth2AccessTokenrenewAccessToken()OAuthsetAccessToken(com.github.scribejava.core.model.OAuth2AccessToken accessToken)OAuthsetAccessToken(String accessToken)voidsetBasePath(String basePath)OAuthsetCredentials(String clientId, String clientSecret, Boolean debug)OAuthsetFlow(OAuthFlow flow)OAuthsetScope(String scope)OAuthuseAuthorizationCodeFlow(String code)OAuthusePasswordFlow(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:AuthenticationApply authentication settings to header and query params.- Specified by:
applyToParamsin 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)
-
-