Android Reference
com.kakao.auth
Class AuthService
-
package com.kakao.auth public class AuthService extends Object
Service class for age authentication or checking access token info.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AuthService.AgeAuthLevel
연령인증 레벨을 설정한다.static class
AuthService.AgeAuthStatus
연령인증시 응답받을 수 있는 StatusCode.static class
AuthService.AgeLimit
연령제한, 일반적으로 12세, 15세, 19세
-
Method Summary
Methods Modifier and Type Method and Description static AuthService
getInstance()
void
requestAccessTokenInfo(ApiResponseCallback<com.kakao.auth.network.response.AccessTokenInfoResponse> callback)
로그인을 통해 얻은 사용자 토큰의 정보를 얻는다.Future<Integer>
requestShowAgeAuthDialog(com.kakao.auth.callback.AccountResponseCallback callback, Bundle ageAuthParams, Context context)
연령인증이 필요한 경우에 동의창을 띄우기 위한 용도로 사용된다.
-
-
-
Method Detail
-
public static AuthService getInstance()
-
public void requestAccessTokenInfo(ApiResponseCallback<com.kakao.auth.network.response.AccessTokenInfoResponse> callback)
로그인을 통해 얻은 사용자 토큰의 정보를 얻는다. 정보 뿐 아니라 해당 토큰의 만료 기간 등에 대한 유효성을 검증 있다. 사용자 토큰이 유효할 경우 토큰의 정보를 응답으로 받을 수 있으며, 토큰이 유효하지 않을 경우 상황에 맞는 오류를 받는다. 다른 API와 달리 sigup이 호출되기 전에도 호출할 수 있다 즉, 미가입 상태 사용자 id를 확인할 때에도 사용할 수 있다- Parameters:
callback
- 요청 결과에 대한 callback
-
public Future<Integer> requestShowAgeAuthDialog(com.kakao.auth.callback.AccountResponseCallback callback, Bundle ageAuthParams, Context context)
연령인증이 필요한 경우에 동의창을 띄우기 위한 용도로 사용된다. UI Thread 에서 동작해야하며, 기본적으로 SDK 내부에서 필요한 경우 자동으로 띄우기 때문에 수동을 콘텐츠 연령인증이 필요한경우 띄우기 동의창을 띄우기 위한 용도로 사용한다. (제휴를 통해 권한이 부여된 특정 앱에서만 호출이 가능합니다.)- Parameters:
callback
- 요청 결과에 대한 callbackageAuthParams
-AgeAuthParamBuilder
를 통해 만든 연령인증에 필요한 파람들context
- Permission 을 체크하는 용도로 사용하는 현재 앱 context- Returns:
AuthService.AgeAuthStatus
연령인증 요청 응답 status
-
-