public abstract class OAuthClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OAuthClient.OAuthBuilder<T extends OAuthClient.OAuthBuilder<T>> |
| Modifier and Type | Field and Description |
|---|---|
protected CozeAuthAPI |
api |
protected String |
baseURL |
protected String |
clientID |
protected String |
clientSecret |
protected ExecutorService |
executorService |
protected String |
hostName |
protected String |
wwwURL |
| Modifier | Constructor and Description |
|---|---|
protected |
OAuthClient(OAuthClient.OAuthBuilder<?> builder) |
| Modifier and Type | Method and Description |
|---|---|
protected retrofit2.Retrofit |
defaultRetrofit(okhttp3.OkHttpClient client,
com.fasterxml.jackson.databind.ObjectMapper mapper,
String baseURL) |
protected static <T> T |
execute(io.reactivex.Single<retrofit2.Response<T>> apiCall) |
protected OAuthToken |
getAccessToken(GrantType type,
String clientSecret,
String redirectURI) |
protected OAuthToken |
getAccessToken(GrantType type,
String code,
String clientSecret,
String redirectURI) |
protected OAuthToken |
getAccessToken(String secret,
GetAccessTokenReq req) |
protected OAuthToken |
getAccountAccessToken(String secret,
String accountID,
GetAccessTokenReq req) |
protected OAuthToken |
getEnterpriseAccessToken(String secret,
String enterpriseID,
GetAccessTokenReq req) |
protected String |
getOAuthURL(String redirectURI,
String state) |
protected String |
getOAuthURL(String redirectURI,
String state,
String workspace) |
protected String |
getOAuthURL(String redirectURI,
String state,
String codeChallenge,
String codeChallengeMethod) |
protected String |
getOAuthURL(String redirectURI,
String state,
String codeChallenge,
String codeChallengeMethod,
String workspaceID) |
protected OAuthToken |
refreshAccessToken(String refreshToken) |
protected OAuthToken |
refreshAccessToken(String refreshToken,
String clientSecret) |
abstract OAuthToken |
refreshToken(String refreshToken) |
void |
shutdownExecutor() |
protected final String clientSecret
protected final String clientID
protected final String baseURL
protected final String wwwURL
protected final CozeAuthAPI api
protected final ExecutorService executorService
protected final String hostName
protected OAuthClient(OAuthClient.OAuthBuilder<?> builder)
protected String getOAuthURL(String redirectURI, String state, String codeChallenge, String codeChallengeMethod)
protected String getOAuthURL(String redirectURI, String state, String codeChallenge, String codeChallengeMethod, String workspaceID)
protected retrofit2.Retrofit defaultRetrofit(okhttp3.OkHttpClient client,
com.fasterxml.jackson.databind.ObjectMapper mapper,
String baseURL)
protected OAuthToken getAccessToken(GrantType type, String code, String clientSecret, String redirectURI)
protected OAuthToken getAccessToken(GrantType type, String clientSecret, String redirectURI)
protected OAuthToken getAccessToken(String secret, GetAccessTokenReq req)
protected OAuthToken getAccountAccessToken(String secret, String accountID, GetAccessTokenReq req)
protected OAuthToken getEnterpriseAccessToken(String secret, String enterpriseID, GetAccessTokenReq req)
protected OAuthToken refreshAccessToken(String refreshToken, String clientSecret)
protected OAuthToken refreshAccessToken(String refreshToken)
public void shutdownExecutor()
protected static <T> T execute(io.reactivex.Single<retrofit2.Response<T>> apiCall)
public abstract OAuthToken refreshToken(String refreshToken)
Copyright © 2025. All rights reserved.