kakao-partner-android-sdk-rx / com.kakao.sdk.user / UserApiClient

UserApiClient

class UserApiClient

사용자관리 API 호출을 담당하는 클라이언트.

Constructors

<init>

사용자관리 API 호출을 담당하는 클라이언트.

UserApiClient(userApi: UserApi = ApiFactory.kapiWithOAuth.create(UserApi::class.java), tokenManagerProvider: TokenManagerProvider = TokenManagerProvider.instance)

Functions

accessTokenInfo

현재 로그인한 사용자의 엑세스 토큰 정보 보기.

fun accessTokenInfo(callback: (tokenInfo: AccessTokenInfo?, error: Throwable?) -> Unit): Unit

certLoginWithKakaoAccount

채널 메시지 방식 카카오톡 인증 로그인

fun certLoginWithKakaoAccount(context: Context, prompts: List<Prompt>? = null, state: String? = null, channelPublicIds: List<String>? = null, serviceTerms: List<String>? = null, loginHint: String? = null, callback: (certTokenInfo: CertTokenInfo?, error: Throwable?) -> Unit): Unit

certLoginWithKakaoTalk

앱투앱(App-to-App) 방식 카카오톡 인증 로그인

fun certLoginWithKakaoTalk(context: Context, prompts: List<Prompt>? = null, state: String? = null, requestCode: Int = AuthCodeClient.DEFAULT_REQUEST_CODE, channelPublicIds: List<String>? = null, serviceTerms: List<String>? = null, callback: (certTokenInfo: CertTokenInfo?, error: Throwable?) -> Unit): Unit

isKakaoTalkLoginAvailable

카카오톡으로 로그인 가능(설치) 여부 검사.

fun isKakaoTalkLoginAvailable(context: Context): Boolean

loginWithKakaoAccount

카카오계정으로 로그인. 기본 웹 브라우저(CustomTabs)에 있는 카카오계정 cookie 로 사용자를 인증하고 OAuthToken 발급.

fun loginWithKakaoAccount(context: Context, prompts: List<Prompt>? = null, channelPublicIds: List<String>? = null, serviceTerms: List<String>? = null, loginHint: String? = null, callback: (token: OAuthToken?, error: Throwable?) -> Unit): Unit

loginWithKakaoTalk

카카오톡으로 로그인. 카카오톡에 연결된 카카오계정으로 사용자를 인증하고 OAuthToken 발급.

fun loginWithKakaoTalk(context: Context, requestCode: Int = AuthCodeClient.DEFAULT_REQUEST_CODE, channelPublicIds: List<String>? = null, serviceTerms: List<String>? = null, callback: (token: OAuthToken?, error: Throwable?) -> Unit): Unit

loginWithNewScopes

사용자가 아직 동의하지 않은 개인정보 및 접근권한 동의 항목에 대하여 동의를 요청하는 동의 화면을 출력하고, 사용자 동의 시 동의항목이 업데이트 된 OAuthToken 발급.

fun loginWithNewScopes(context: Context, scopes: List<String>, callback: (token: OAuthToken?, error: Throwable?) -> Unit): Unit

logout

현재 토큰을 강제로 만료시키고 로그아웃.

fun logout(callback: (error: Throwable?) -> Unit): Unit

me

사용자 정보 요청.

fun me(secureReSource: Boolean = true, callback: (user: User?, error: Throwable?) -> Unit): Unit

revokeScopes

사용자의 특정 동의 항목에 대한 동의를 철회하고, 남은 사용자 동의 항목의 상세 정보 목록 반환.

fun revokeScopes(scopes: List<String>, callback: (scopeInfo: ScopeInfo?, error: Throwable?) -> Unit): Unit

scopes

사용자 동의 항목의 상세 정보 목록 반환.

fun scopes(scopes: List<String>? = null, callback: (scopeInfo: ScopeInfo?, error: Throwable?) -> Unit): Unit

serviceTerms

사용자가 카카오 간편가입을 통해 동의한 서비스 약관 내역 반환.

fun serviceTerms(extra: String? = null, callback: (userServiceTerms: UserServiceTerms?, error: Throwable?) -> Unit): Unit

shippingAddresses

사용자의 배송지 정보 획득.

fun shippingAddresses(fromUpdateAt: Date? = null, pageSize: Int? = null, callback: (userShippingAddresses: UserShippingAddresses?, error: Throwable?) -> Unit): Unit
fun shippingAddresses(addressId: Long, callback: (userShippingAddresses: UserShippingAddresses?, error: Throwable?) -> Unit): Unit

signup

앱 연결 상태가 PREREGISTER 상태의 사용자에 대하여 앱 연결 요청. 자동연결 설정을 비활성화한 앱에서 사용.

fun signup(properties: Map<String, String>? = null, callback: (error: Throwable?) -> Unit): Unit

unlink

연결 끊기. 카카오 로그인을 통한 사용자와 서비스 간의 연결 관계를 해제하고 사용자의 정보 제공 및 카카오 플랫폼 사용을 중단.

fun unlink(callback: (error: Throwable?) -> Unit): Unit

updateProfile

User 클래스에서 제공되고 있는 사용자의 부가정보를 신규저장 및 수정.

fun updateProfile(properties: Map<String, String>, callback: (error: Throwable?) -> Unit): Unit

Companion Object Properties

instance

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

val instance: UserApiClient

Extension Properties

partnerSignupApi

val UserApiClient.partnerSignupApi: UserApi

Extension Functions

ageAuthInfo

연령인증이 필요한 시점 연령인증 결과 조회를 확인 하기 위해 사용.

fun UserApiClient.ageAuthInfo(ageLimit: Int? = null, propertyKeys: List<String>? = null, callback: (info: AgeAuthInfo?, error: Throwable?) -> Unit): Unit

loginWithKakaoAccount

기본 브라우저의 카카오계정 쿠키 유무와 관계 없이 카카오계정 로그인 페이지를 먼저 호출하여 사용자를 인증한 후 토큰을 발급 받습니다.

fun UserApiClient.loginWithKakaoAccount(context: Context, accountParameters: Map<String, String>, callback: (token: OAuthToken?, error: Throwable?) -> Unit): Unit

meForPartner

파트너용 /v2/user/me API 를 호출. 사용자에 대한 다양한 정보 획득.

fun UserApiClient.meForPartner(propertyKeys: List<String>? = null, secureReSource: Boolean = true, callback: (user: PartnerUser?, error: Throwable?) -> Unit): Unit

signupForPartner

앱 연결 상태가 PREREGISTER 상태의 사용자에 대하여 앱 연결 요청. 자동연결 설정을 비활성화한 앱에서 사용.

fun UserApiClient.signupForPartner(properties: Map<String, String>? = null, callback: (error: Throwable?) -> Unit): Unit

upgradeScopes

요청한 동의 항목(Scope)를 사용자가 동의한 동의 항목으로 추가 하기 위해 사용.

fun UserApiClient.upgradeScopes(scopes: List<String>, guardianToken: String? = null, callback: (info: ScopeInfo?, error: Throwable?) -> Unit): Unit

Companion Object Extension Properties

rx

ReactiveX 를 위한 UserApiClient singleton 객체

val UserApiClient.Companion.rx: RxUserApiClient