use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.
the class OAuth2ServiceResourceOwnerTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
backendURL = context.getContextUrls().getBackEndUrl();
loginLogoutClient = new LoginLogoutClient(context);
logManger = new AuthenticatorClient(backendURL);
sessionCookie = logManger.login(username, userPassword, context.getInstance().getHosts().get("default"));
identityContextUrls = context.getContextUrls();
tenantInfo = context.getContextTenant();
userInfo = tenantInfo.getContextUser();
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
adminClient = new OauthAdminClient(backendURL, sessionCookie);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
setSystemproperties();
client = HttpClientBuilder.create().build();
identityGovernanceServiceClient = new IdentityGovernanceServiceClient(sessionCookie, backendURL);
createLockedUser(lockedUser, lockedUserPassword);
}
use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.
the class OAuth2ServiceClientCredentialTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
backendURL = context.getContextUrls().getBackEndUrl();
loginLogoutClient = new LoginLogoutClient(context);
logManger = new AuthenticatorClient(backendURL);
sessionCookie = logManger.login(username, userPassword, context.getInstance().getHosts().get("default"));
identityContextUrls = context.getContextUrls();
tenantInfo = context.getContextTenant();
userInfo = tenantInfo.getContextUser();
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
adminClient = new OauthAdminClient(backendURL, sessionCookie);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
setSystemproperties();
client = HttpClientBuilder.create().build();
}
use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.
the class Oauth2OPIframeTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
backendURL = context.getContextUrls().getBackEndUrl();
loginLogoutClient = new LoginLogoutClient(context);
logManger = new AuthenticatorClient(backendURL);
sessionCookie = logManger.login(username, userPassword, context.getInstance().getHosts().get("default"));
identityContextUrls = context.getContextUrls();
tenantInfo = context.getContextTenant();
userInfo = tenantInfo.getContextUser();
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
adminClient = new OauthAdminClient(backendURL, sessionCookie);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
setSystemproperties();
client = new DefaultHttpClient();
}
use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.
the class ISIntegrationTest method init.
protected void init(String instance, String domainKey, String userKey) throws Exception {
isServer = new AutomationContext("IDENTITY", instance, domainKey, userKey);
loginLogoutClient = new LoginLogoutClient(isServer);
sessionCookie = loginLogoutClient.login();
backendURL = isServer.getContextUrls().getBackEndUrl();
}
use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.
the class SCIM2MeTestCase method assignUserToGroup.
private void assignUserToGroup(String username) throws Exception {
AutomationContext automationContext;
if (tenant.equals(org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) {
automationContext = new AutomationContext("IDENTITY", TestUserMode.SUPER_TENANT_ADMIN);
} else {
automationContext = new AutomationContext("IDENTITY", TestUserMode.TENANT_ADMIN);
}
String backendUrl = automationContext.getContextUrls().getBackEndUrl();
String sessionCookie = new LoginLogoutClient(automationContext).login();
UserManagementClient userMgtClient = new UserManagementClient(backendUrl, sessionCookie);
String[] roles = { ADMIN_ROLE };
userMgtClient.addRemoveRolesOfUser(username, roles, null);
}
Aggregations