Search in sources :

Example 16 with LoginLogoutClient

use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.

the class OAuth2ServiceAuthCodeGrantOpenIdTestCase 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);
    oAuth2TokenValidationClient = new Oauth2TokenValidationClient(backendURL, sessionCookie);
    client = new DefaultHttpClient();
    client.setCookieStore(cookieStore);
    setSystemproperties();
    remoteUSMServiceClient.addUser(USERNAME, PASSWORD, new String[] { "admin" }, getUserClaims(), "default", true);
}
Also used : OauthAdminClient(org.wso2.identity.integration.common.clients.oauth.OauthAdminClient) LoginLogoutClient(org.wso2.carbon.integration.common.utils.LoginLogoutClient) AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) Oauth2TokenValidationClient(org.wso2.identity.integration.common.clients.oauth.Oauth2TokenValidationClient) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) DefaultHttpClient(org.apache.http.impl.client.DefaultHttpClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 17 with LoginLogoutClient

use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.

the class OAuth2ServiceImplicitGrantTestCase 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();
    scopes = "abc";
}
Also used : OauthAdminClient(org.wso2.identity.integration.common.clients.oauth.OauthAdminClient) LoginLogoutClient(org.wso2.carbon.integration.common.utils.LoginLogoutClient) AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 18 with LoginLogoutClient

use of org.wso2.carbon.integration.common.utils.LoginLogoutClient in project product-is by wso2.

the class OAuth2ServiceIntrospectionTestCase 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();
}
Also used : OauthAdminClient(org.wso2.identity.integration.common.clients.oauth.OauthAdminClient) LoginLogoutClient(org.wso2.carbon.integration.common.utils.LoginLogoutClient) AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

LoginLogoutClient (org.wso2.carbon.integration.common.utils.LoginLogoutClient)18 BeforeClass (org.testng.annotations.BeforeClass)10 AutomationContext (org.wso2.carbon.automation.engine.context.AutomationContext)10 AuthenticatorClient (org.wso2.carbon.integration.common.admin.client.AuthenticatorClient)6 ApplicationManagementServiceClient (org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient)6 OauthAdminClient (org.wso2.identity.integration.common.clients.oauth.OauthAdminClient)6 RemoteUserStoreManagerServiceClient (org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)6 Test (org.testng.annotations.Test)3 UserManagementClient (org.wso2.identity.integration.common.clients.UserManagementClient)3 ClaimMetadataManagementServiceClient (org.wso2.identity.integration.common.clients.claim.metadata.mgt.ClaimMetadataManagementServiceClient)3 File (java.io.File)2 DefaultHttpClient (org.apache.http.impl.client.DefaultHttpClient)2 ClaimDialectDTO (org.wso2.carbon.identity.claim.metadata.mgt.stub.dto.ClaimDialectDTO)2 UserManagementClient (org.wso2.carbon.integration.common.admin.client.UserManagementClient)2 ServerConfigurationManager (org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager)2 SCIM2BaseTest (org.wso2.identity.integration.test.scim2.rest.api.SCIM2BaseTest)2 HttpResponse (org.apache.http.HttpResponse)1 HttpPatch (org.apache.http.client.methods.HttpPatch)1 HttpPost (org.apache.http.client.methods.HttpPost)1 StringEntity (org.apache.http.entity.StringEntity)1