@Test public void registerByOauthGoogle() throws Exception { JSONObject oauthParams = new JSONObject(); oauthParams.put("type", "google"); oauthParams.put("id", "googleDummyId"); oauthParams.put("access_token", "googleDummyAccessToken"); NCMBUserService userService = getUserService(); NCMBUser user = userService.registerByOauth(oauthParams); Assert.assertEquals("dummyObjectId", user.getObjectId()); }
public NCMBUser registerByOauth(JSONObject oauthOptions) throws NCMBException { JSONObject params = registerByOauthSetup(oauthOptions); return registerUser(params, true); }
NCMBUserService extends NCMBService { public NCMBUser registerByOauth(JSONObject oauthOptions) throws NCMBException { JSONObject params = registerByOauthSetup(oauthOptions); return registerUser(params, true); } }
NCMBUserService extends NCMBService { public NCMBUser registerByOauth(JSONObject oauthOptions) throws NCMBException { JSONObject params = registerByOauthSetup(oauthOptions); return registerUser(params, true); } NCMBUserService(NCMBContext context); }
NCMBUserService extends NCMBService { public NCMBUser registerByOauth(JSONObject oauthOptions) throws NCMBException { JSONObject params = registerByOauthSetup(oauthOptions); return registerUser(params, true); } NCMBUserService(NCMBContext context); NCMBUser registerByName(String userName, String password); NCMBUser registerByName(String userName, String password,JSONObject otherFields); void saveByName(String userName, String password); void saveByName(String userName, String password,JSONObject otherFields); void registerByNameInBackground(String userName, String password, LoginCallback callback); void registerByNameInBackground(String userName, String password, JSONObject otherFields, LoginCallback callback); NCMBUser registerByOauth(JSONObject oauthOptions); void registerByOauthInBackground(JSONObject oauthOptions, LoginCallback callback); void inviteByMail(String mailAddress); void inviteByMailInBackground(String mailAddress, DoneCallback callback); void requestPasswordReset(String mailAddress); void requestPasswordResetInBackground(String mailAddress, DoneCallback callback); NCMBUser fetchUser(String userId); void fetchUserInBackground(String userId, final FetchCallback callback); JSONObject updateUser(String userId, JSONObject params); void updateUserInBackground(final String userId, final JSONObject params, final ExecuteServiceCallback callback); NCMBUser loginByName(String userName, String password); void loginByNameInBackground(String userName, String password,
                                        LoginCallback callback); NCMBUser loginByMail(String mailAddress, String password); void loginByMailInBackground(String mailAddress, String password,
                                        LoginCallback callback); void deleteUser(String userId); void deleteUserInBackground(final String userId, ExecuteServiceCallback callback); void logout(); void logoutInBackground(DoneCallback callback); ArrayList<NCMBUser> searchUser(JSONObject conditions); void searchUserInBackground(JSONObject conditions, final SearchUserCallback callback); }
NCMBUserService extends NCMBService { public NCMBUser registerByOauth(JSONObject oauthOptions) throws NCMBException { JSONObject params = registerByOauthSetup(oauthOptions); return registerUser(params, true); } NCMBUserService(NCMBContext context); NCMBUser registerByName(String userName, String password); NCMBUser registerByName(String userName, String password,JSONObject otherFields); void saveByName(String userName, String password); void saveByName(String userName, String password,JSONObject otherFields); void registerByNameInBackground(String userName, String password, LoginCallback callback); void registerByNameInBackground(String userName, String password, JSONObject otherFields, LoginCallback callback); NCMBUser registerByOauth(JSONObject oauthOptions); void registerByOauthInBackground(JSONObject oauthOptions, LoginCallback callback); void inviteByMail(String mailAddress); void inviteByMailInBackground(String mailAddress, DoneCallback callback); void requestPasswordReset(String mailAddress); void requestPasswordResetInBackground(String mailAddress, DoneCallback callback); NCMBUser fetchUser(String userId); void fetchUserInBackground(String userId, final FetchCallback callback); JSONObject updateUser(String userId, JSONObject params); void updateUserInBackground(final String userId, final JSONObject params, final ExecuteServiceCallback callback); NCMBUser loginByName(String userName, String password); void loginByNameInBackground(String userName, String password,
                                        LoginCallback callback); NCMBUser loginByMail(String mailAddress, String password); void loginByMailInBackground(String mailAddress, String password,
                                        LoginCallback callback); void deleteUser(String userId); void deleteUserInBackground(final String userId, ExecuteServiceCallback callback); void logout(); void logoutInBackground(DoneCallback callback); ArrayList<NCMBUser> searchUser(JSONObject conditions); void searchUserInBackground(JSONObject conditions, final SearchUserCallback callback); static final String SERVICE_PATH; static final int HTTP_STATUS_REGISTERED; static final int HTTP_STATUS_AUTHORIZED; static final int HTTP_STATUS_REQUEST_ACCEPTED; }