Package app.sdkgen.client
Class ClientAbstract
java.lang.Object
app.sdkgen.client.ClientAbstract
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected CredentialsInterfaceprotected com.fasterxml.jackson.databind.ObjectMapperprotected TokenStoreInterface -
Constructor Summary
ConstructorsConstructorDescriptionClientAbstract(String baseUrl, CredentialsInterface credentials, TokenStoreInterface tokenStore)ClientAbstract(String baseUrl, CredentialsInterface credentials, TokenStoreInterface tokenStore, List<String> scopes)ClientAbstract(String baseUrl, CredentialsInterface credentials, TokenStoreInterface tokenStore, List<String> scopes, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionbuildRedirectUrl(String redirectUrl, List<String> scopes, String state)protected AccessTokenprotected AccessTokenfetchAccessTokenByCode(String code)protected AccessTokenfetchAccessTokenByRefresh(String refreshToken)protected Stringprotected StringgetAccessToken(boolean automaticRefresh, int expireThreshold)protected org.apache.http.client.HttpClientprotected org.apache.http.client.HttpClientnewHttpClient(CredentialsInterface credentials)
-
Field Details
-
baseUrl
-
credentials
-
tokenStore
-
scopes
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
ClientAbstract
public ClientAbstract(String baseUrl, CredentialsInterface credentials, TokenStoreInterface tokenStore, List<String> scopes, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
ClientAbstract
public ClientAbstract(String baseUrl, CredentialsInterface credentials, TokenStoreInterface tokenStore, List<String> scopes) -
ClientAbstract
public ClientAbstract(String baseUrl, CredentialsInterface credentials, TokenStoreInterface tokenStore)
-
-
Method Details
-
buildRedirectUrl
public String buildRedirectUrl(String redirectUrl, List<String> scopes, String state) throws InvalidCredentialsException, URISyntaxException -
fetchAccessTokenByCode
protected AccessToken fetchAccessTokenByCode(String code) throws InvalidCredentialsException, IOException, InvalidAccessTokenException, TokenPersistException -
fetchAccessTokenByClientCredentials
protected AccessToken fetchAccessTokenByClientCredentials() throws InvalidCredentialsException, IOException, InvalidAccessTokenException, TokenPersistException -
fetchAccessTokenByRefresh
protected AccessToken fetchAccessTokenByRefresh(String refreshToken) throws InvalidCredentialsException, FoundNoAccessTokenException, IOException, InvalidAccessTokenException, TokenPersistException -
getAccessToken
protected String getAccessToken(boolean automaticRefresh, int expireThreshold) throws FoundNoAccessTokenException, InvalidAccessTokenException, TokenPersistException, InvalidCredentialsException, IOException -
getAccessToken
protected String getAccessToken() throws FoundNoAccessTokenException, InvalidAccessTokenException, TokenPersistException, InvalidCredentialsException, IOException -
newHttpClient
-
newHttpClient
protected org.apache.http.client.HttpClient newHttpClient()
-