kakao-android-sdk-rx / com.kakao.sdk.auth / AuthApiClient

AuthApiClient

class AuthApiClient

카카오 OAuth 서버에서 제공하는 API 를 사용하기 위한 클라이언트.

Constructors

<init>

카카오 OAuth 서버에서 제공하는 API 를 사용하기 위한 클라이언트.

AuthApiClient(authApi: AuthApi = ApiFactory.kauth.create(AuthApi::class.java), tokenManagerProvider: TokenManagerProvider = TokenManagerProvider.instance, applicationInfo: ApplicationInfo = KakaoSdk.applicationContextInfo, contextInfo: ContextInfo = KakaoSdk.applicationContextInfo)

Functions

issueAccessToken

AuthCodeClient 를 이용하여 발급 받은 인증 코드를 사용하여 액세스 토큰을 발급.

fun issueAccessToken(authCode: String, callback: (token: OAuthToken?, error: Throwable?) -> Unit): Unit

refreshAccessToken

리프레시 토큰으로 액세스 토큰을 갱신.

fun refreshAccessToken(oldToken: OAuthToken = tokenManagerProvider.manager.getToken() ?: throw ClientError(ClientErrorCause.TokenNotFound), callback: (token: OAuthToken?, error: Throwable?) -> Unit): Unitfun refreshAccessToken(oldToken: OAuthToken = tokenManagerProvider.manager.getToken() ?: throw ClientError(ClientErrorCause.TokenNotFound)): OAuthToken

Companion Object Properties

instance

간편한 API 호출을 위해 기본 제공되는 singleton 객체

val instance: AuthApiClient

Companion Object Extension Properties

rx

ReactiveX 를 위한 AuthApiClient singleton 객체

val AuthApiClient.Companion.rx: RxAuthApiClient