com.kkbox.openapideveloper / com.kkbox.openapideveloper.auth / TokenFetcher
class TokenFetcher
The instance of this class fetches open api token.
<init> | TokenFetcher(clientID: String , clientSecret: String , context: Context ) creates a token fetcher. |
clientID | val clientID: String the client ID for accessing kkbox open api. |
clientSecret | val clientSecret: String the client secret for accessing kkbox open api. |
context | val context: Context the context needed for creating http connection. |
fetchAccessToken | fun fetchAccessToken(bodyParameters: Map < String , List < String >>): ResponseFuture<JsonObject> Fetches the access token. |
fetchInfo | fun fetchInfo(accessToken: String ): ResponseFuture<JsonObject> Fetches information about a access token. |
refresh | fun refresh(refreshToken: String ): ResponseFuture<JsonObject> Refresh token when the token expired. |