MCPcopy Create free account
hub / github.com/apache/cloudstack / login

Method login

server/src/test/java/com/cloud/api/APITest.java:189–200  ·  view source on GitHub ↗

Login call @param username user name @param password password (plain password, we will do MD5 hash here for you) @return login response string

(String username, String password)

Source from the content-addressed store, hash-verified

187 * @return login response string
188 */
189 protected void login(String username, String password) {
190 //String md5Psw = createMD5String(password);
191 // send login request
192 HashMap<String, String> params = new HashMap<String, String>();
193 params.put("response", "json");
194 params.put("username", username);
195 params.put("password", password);
196 String result = this.sendRequest("login", params);
197 LoginResponse loginResp = (LoginResponse)fromSerializedString(result, LoginResponse.class);
198 sessionKey = loginResp.getSessionkey();
199
200 }
201}

Callers 1

setupMethod · 0.45

Calls 4

sendRequestMethod · 0.95
fromSerializedStringMethod · 0.95
getSessionkeyMethod · 0.95
putMethod · 0.45

Tested by

no test coverage detected