@Test public void testLogInUserCommand() throws Exception { ParseRESTUserCommand command = ParseRESTUserCommand.logInUserCommand( "userName", "password", true); assertEquals("login", command.httpPath); assertEquals(ParseHttpRequest.Method.GET, command.method); assertEquals("userName", command.jsonParameters.getString("username")); assertEquals("password", command.jsonParameters.getString("password")); assertNull(command.getSessionToken()); }
public static ParseRESTUserCommand logInUserCommand(String username, String password, boolean revocableSession) { Map<String, String> parameters = new HashMap<>(); parameters.put("username", username); parameters.put("password", password); return new ParseRESTUserCommand( "login", ParseHttpRequest.Method.GET, parameters, null, revocableSession); }
ParseRESTUserCommand extends ParseRESTCommand { public static ParseRESTUserCommand logInUserCommand(String username, String password, boolean revocableSession) { Map<String, String> parameters = new HashMap<>(); parameters.put("username", username); parameters.put("password", password); return new ParseRESTUserCommand( "login", ParseHttpRequest.Method.GET, parameters, null, revocableSession); } }
ParseRESTUserCommand extends ParseRESTCommand { public static ParseRESTUserCommand logInUserCommand(String username, String password, boolean revocableSession) { Map<String, String> parameters = new HashMap<>(); parameters.put("username", username); parameters.put("password", password); return new ParseRESTUserCommand( "login", ParseHttpRequest.Method.GET, 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 logInUserCommand(String username, String password, boolean revocableSession) { Map<String, String> parameters = new HashMap<>(); parameters.put("username", username); parameters.put("password", password); return new ParseRESTUserCommand( "login", ParseHttpRequest.Method.GET, 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 logInUserCommand(String username, String password, boolean revocableSession) { Map<String, String> parameters = new HashMap<>(); parameters.put("username", username); parameters.put("password", password); return new ParseRESTUserCommand( "login", ParseHttpRequest.Method.GET, 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();  }