OpenAPI-Android

com.kkbox.openapideveloper / com.kkbox.openapideveloper.auth / TokenFetcher

TokenFetcher

class TokenFetcher

The instance of this class fetches open api token.

Constructors

<init> TokenFetcher(clientID: String, clientSecret: String, context: Context)
creates a token fetcher.

Properties

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.

Functions

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.