@Test public void testServiceLogInUserCommandWithParameters() throws Exception { JSONObject parameters = new JSONObject(); parameters.put("key", "value"); ParseRESTUserCommand command = ParseRESTUserCommand.serviceLogInUserCommand(parameters, "sessionToken", true); assertEquals("users", command.httpPath); assertEquals(ParseHttpRequest.Method.POST, command.method); assertEquals("value", command.jsonParameters.getString("key")); assertEquals("sessionToken", command.getSessionToken()); }
public static ParseRESTUserCommand serviceLogInUserCommand( String authType, Map<String, String> authData, boolean revocableSession) { JSONObject parameters; try { JSONObject authenticationData = new JSONObject(); authenticationData.put(authType, PointerEncoder.get().encode(authData)); parameters = new JSONObject(); parameters.put("authData", authenticationData); } catch (JSONException e) { throw new RuntimeException("could not serialize object to JSON"); } return serviceLogInUserCommand(parameters, null, revocableSession); }
ParseRESTUserCommand extends ParseRESTCommand { public static ParseRESTUserCommand serviceLogInUserCommand( String authType, Map<String, String> authData, boolean revocableSession) { JSONObject parameters; try { JSONObject authenticationData = new JSONObject(); authenticationData.put(authType, PointerEncoder.get().encode(authData)); parameters = new JSONObject(); parameters.put("authData", authenticationData); } catch (JSONException e) { throw new RuntimeException("could not serialize object to JSON"); } return serviceLogInUserCommand(parameters, null, revocableSession); } }
ParseRESTUserCommand extends ParseRESTCommand { public static ParseRESTUserCommand serviceLogInUserCommand( String authType, Map<String, String> authData, boolean revocableSession) { JSONObject parameters; try { JSONObject authenticationData = new JSONObject(); authenticationData.put(authType, PointerEncoder.get().encode(authData)); parameters = new JSONObject(); parameters.put("authData", authenticationData); } catch (JSONException e) { throw new RuntimeException("could not serialize object to JSON"); } return serviceLogInUserCommand(parameters, null, revocableSession); } private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            Map<String, ?> parameters,
            String sessionToken); private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            Map<String, ?> parameters,
            String sessionToken, boolean isRevocableSessionEnabled); private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            JSONObject parameters,
            String sessionToken, boolean isRevocableSessionEnabled); }
ParseRESTUserCommand extends ParseRESTCommand { public static ParseRESTUserCommand serviceLogInUserCommand( String authType, Map<String, String> authData, boolean revocableSession) { JSONObject parameters; try { JSONObject authenticationData = new JSONObject(); authenticationData.put(authType, PointerEncoder.get().encode(authData)); parameters = new JSONObject(); parameters.put("authData", authenticationData); } catch (JSONException e) { throw new RuntimeException("could not serialize object to JSON"); } return serviceLogInUserCommand(parameters, null, revocableSession); } private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            Map<String, ?> parameters,
            String sessionToken); private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            Map<String, ?> parameters,
            String sessionToken, boolean isRevocableSessionEnabled); private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            JSONObject parameters,
            String sessionToken, boolean isRevocableSessionEnabled); static ParseRESTUserCommand getCurrentUserCommand(String sessionToken); static ParseRESTUserCommand signUpUserCommand(JSONObject parameters, String sessionToken,
                                                         boolean revocableSession); static ParseRESTUserCommand logInUserCommand(String username, String password,
                                                        boolean revocableSession); static ParseRESTUserCommand serviceLogInUserCommand(
            String authType, Map<String, String> authData, boolean revocableSession); static ParseRESTUserCommand serviceLogInUserCommand(JSONObject parameters,
                                                               String sessionToken, boolean revocableSession); static ParseRESTUserCommand resetPasswordResetCommand(String email); int getStatusCode(); }
ParseRESTUserCommand extends ParseRESTCommand { public static ParseRESTUserCommand serviceLogInUserCommand( String authType, Map<String, String> authData, boolean revocableSession) { JSONObject parameters; try { JSONObject authenticationData = new JSONObject(); authenticationData.put(authType, PointerEncoder.get().encode(authData)); parameters = new JSONObject(); parameters.put("authData", authenticationData); } catch (JSONException e) { throw new RuntimeException("could not serialize object to JSON"); } return serviceLogInUserCommand(parameters, null, revocableSession); } private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            Map<String, ?> parameters,
            String sessionToken); private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            Map<String, ?> parameters,
            String sessionToken, boolean isRevocableSessionEnabled); private  ParseRESTUserCommand(
            String httpPath,
            ParseHttpRequest.Method httpMethod,
            JSONObject parameters,
            String sessionToken, boolean isRevocableSessionEnabled); static ParseRESTUserCommand getCurrentUserCommand(String sessionToken); static ParseRESTUserCommand signUpUserCommand(JSONObject parameters, String sessionToken,
                                                         boolean revocableSession); static ParseRESTUserCommand logInUserCommand(String username, String password,
                                                        boolean revocableSession); static ParseRESTUserCommand serviceLogInUserCommand(
            String authType, Map<String, String> authData, boolean revocableSession); static ParseRESTUserCommand serviceLogInUserCommand(JSONObject parameters,
                                                               String sessionToken, boolean revocableSession); static ParseRESTUserCommand resetPasswordResetCommand(String email); int getStatusCode();  }