public static class AccessToken.Factory extends Object
Modifier and Type | Field and Description |
---|---|
static com.kakao.network.response.ResponseStringConverter<AccessToken> |
CONVERTER |
Constructor and Description |
---|
Factory() |
Modifier and Type | Method and Description |
---|---|
static AccessToken |
createEmptyToken()
Create a dummy empty token info, usually used to clear access token.
|
static AccessToken |
createFromCache(ISessionConfig sessionConfig,
com.kakao.util.helper.PersistentKVStore cache)
Create an access token from cache to be used globally by Session.
|
static AccessToken |
createFromResponse(String stringData)
Create an access token from a successful response from Kakao OAuth server.
|
static AccessToken |
getInstance() |
public static com.kakao.network.response.ResponseStringConverter<AccessToken> CONVERTER
public static AccessToken createEmptyToken()
public static AccessToken createFromCache(ISessionConfig sessionConfig, com.kakao.util.helper.PersistentKVStore cache)
sessionConfig
- ISessionConfig instancecache
- Persistent storage to store access tokenpublic static AccessToken createFromResponse(String stringData)
stringData
- responsecom.kakao.auth.network.response.AuthResponseError
- if there was an error response (http status code other than 200)ResponseBody.ResponseBodyException
- if response body is malformedpublic static AccessToken getInstance()