public void onAuthenticated(BoxAuthenticationInfo infoOriginal, Context context) {
        BoxAuthenticationInfo info = BoxAuthenticationInfo.unmodifiableObject(infoOriginal);
        if (!SdkUtils.isBlank(info.accessToken()) && (info.getUser() == null || SdkUtils.isBlank(info.getUser().getId()))){
            // insufficient information so we need to fetch the user info first.
            doUserRefresh(context, info);
            return;
        }
        getAuthInfoMap(context).put(info.getUser().getId(), info.clone());
        authStorage.storeLastAuthenticatedUserId(info.getUser().getId(), context);
        authStorage.storeAuthInfoMap(mCurrentAccessInfo, context);
        // if accessToken has not already been refreshed, issue refresh request and cache result
        Set<AuthListener> listeners = getListeners();
        for (AuthListener listener : listeners) {
            listener.onAuthCreated(info);
        }
    }
public void onAuthenticated ( BoxAuthenticationInfo infoOriginal , Context context ) { BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; if ( ! SdkUtils . isBlank ( info . accessToken ( ) ) && ( info . getUser ( ) == null || SdkUtils . isBlank ( info . getUser ( ) . getId ( ) ) ) ) { doUserRefresh ( context , info ) ; return ; } getAuthInfoMap ( context ) . put ( info . getUser ( ) . getId ( ) , info . clone ( ) ) ; authStorage . storeLastAuthenticatedUserId ( info . getUser ( ) . getId ( ) , context ) ; authStorage . storeAuthInfoMap ( mCurrentAccessInfo , context ) ; Set < AuthListener > listeners = getListeners ( ) ; for ( AuthListener listener : listeners ) { listener . onAuthCreated ( info ) ; } }
Callback method to be called when authentication process finishes.
@param infoOriginal the authentication information that successfully authenticated.
@param context the current application context (that can be used to launch ui or access resources).