Skip to content

Commit e866218

Browse files
committed
AC-143 new api end point to impersonate user
1 parent 970a0cc commit e866218

File tree

10 files changed

+14570
-14284
lines changed

10 files changed

+14570
-14284
lines changed
Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
1-
// Licensed to the Apache Software Foundation (ASF) under one
2-
// or more contributor license agreements. See the NOTICE file
3-
// distributed with this work for additional information
4-
// regarding copyright ownership. The ASF licenses this file
5-
// to you under the Apache License, Version 2.0 (the
6-
// "License"); you may not use this file except in compliance
7-
// with the License. You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing,
12-
// software distributed under the License is distributed on an
13-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
// KIND, either express or implied. See the License for the
15-
// specific language governing permissions and limitations
16-
// under the License.
17-
package org.apache.cloudstack.api;
18-
19-
import java.net.InetAddress;
20-
import java.util.Map;
21-
22-
import javax.servlet.http.HttpSession;
23-
24-
import com.cloud.exception.CloudAuthenticationException;
25-
26-
public interface ApiServerService {
27-
public boolean verifyRequest(Map<String, Object[]> requestParameters, Long userId, InetAddress remoteAddress) throws ServerApiException;
28-
29-
public Long fetchDomainId(String domainUUID);
30-
31-
public ResponseObject loginUser(HttpSession session, String username, String password, Long domainId, String domainPath, InetAddress loginIpAddress,
32-
Map<String, Object[]> requestParameters) throws CloudAuthenticationException;
33-
34-
public void logoutUser(long userId);
35-
36-
public boolean verifyUser(Long userId);
37-
38-
public String getSerializedApiError(int errorCode, String errorText, Map<String, Object[]> apiCommandParams, String responseType);
39-
40-
public String getSerializedApiError(ServerApiException ex, Map<String, Object[]> apiCommandParams, String responseType);
41-
42-
public String handleRequest(Map params, String responseType, StringBuilder auditTrailSb) throws ServerApiException;
43-
44-
public Class<?> getCmdClass(String cmdName);
45-
46-
}
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api;
18+
19+
import java.net.InetAddress;
20+
import java.util.Map;
21+
22+
import javax.servlet.http.HttpSession;
23+
24+
import com.cloud.exception.CloudAuthenticationException;
25+
26+
public interface ApiServerService {
27+
public boolean verifyRequest(Map<String, Object[]> requestParameters, Long userId, InetAddress remoteAddress) throws ServerApiException;
28+
29+
public Long fetchDomainId(String domainUUID);
30+
31+
public ResponseObject loginUser(HttpSession session, String username, String password, Long domainId, String domainPath, InetAddress loginIpAddress,
32+
Map<String, Object[]> requestParameters) throws CloudAuthenticationException;
33+
34+
public ResponseObject impersonateUser(HttpSession session, String username, Long domainId, String domainPath, InetAddress loginIpAddress,
35+
Map<String, Object[]> requestParameters) throws CloudAuthenticationException;
36+
37+
public void logoutUser(long userId);
38+
39+
public boolean verifyUser(Long userId);
40+
41+
public String getSerializedApiError(int errorCode, String errorText, Map<String, Object[]> apiCommandParams, String responseType);
42+
43+
public String getSerializedApiError(ServerApiException ex, Map<String, Object[]> apiCommandParams, String responseType);
44+
45+
public String handleRequest(Map params, String responseType, StringBuilder auditTrailSb) throws ServerApiException;
46+
47+
public Class<?> getCmdClass(String cmdName);
48+
49+
}

0 commit comments

Comments
 (0)