• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AuthenticatorClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.wso2.carbon.integration.common.admin.client.AuthenticatorClient的典型用法代码示例。如果您正苦于以下问题:Java AuthenticatorClient类的具体用法?Java AuthenticatorClient怎么用?Java AuthenticatorClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AuthenticatorClient类属于org.wso2.carbon.integration.common.admin.client包,在下文中一共展示了AuthenticatorClient类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testTenantIDInTenantResponsePath

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
@Test(groups = {"wso2.esb"})
public void testTenantIDInTenantResponsePath() throws Exception {
    // create a tenant
    TenantManagementServiceClient tenantMgtAdminServiceClient = new TenantManagementServiceClient(contextUrls.getBackEndUrl(), sessionCookie);
    tenantMgtAdminServiceClient.addTenant("t5.com", "jhonporter", "jhon", "demo");
    // log as tenant
    AuthenticatorClient authClient = new AuthenticatorClient(contextUrls.getBackEndUrl());
    String session = authClient.login("[email protected]", "jhonporter", "localhost");
    // load configuration in tenant space
    esbUtils.loadESBConfigurationFrom("artifacts/ESB/ServiceChainingConfig.xml", contextUrls.getBackEndUrl(), session);
    // Create service client
    ServiceClient sc = getServiceClient("http://localhost:8480/services/t/t5.com/ServiceChainingProxy", null,
                                        "wso2");
    sc.fireAndForget(createStandardSimpleRequest("wso2"));
    // Get logs by tenant name
    LogViewerClient logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), sessionCookie);
    LogEvent[] logs = logViewerClient.getLogs("ALL", "RECEIVE", "t5.com", "");
    Assert.assertNotNull(logs);
    LogEvent receiveSeqLog_1 = getLogEventByMessage(logs, "DEBUG SEQ 1 = FIRST RECEIVE SEQUENCE");
    Assert.assertNotNull(receiveSeqLog_1);
    LogEvent receiveSeqLog_2 = getLogEventByMessage(logs, "DEBUG SEQ 2 = SECOND RECEIVE SEQUENCE");
    Assert.assertNotNull(receiveSeqLog_2);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:24,代码来源:ServiceChainingTest.java


示例2: init

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init()
        throws XPathExpressionException, IOException,
               LoginAuthenticationExceptionException {

    AutomationContext automationContext = new AutomationContext();
    ip = automationContext.getDefaultInstance().getHosts().get("default");
    port = automationContext.getDefaultInstance().getPorts().get("https");
    AuthenticatorClient authenticationAdminClient
            = new AuthenticatorClient(automationContext.getContextUrls().getBackEndUrl());
    webappAdminStub = new WebappAdminStub(automationContext.getContextUrls().getBackEndUrl()
            + "WebappAdmin");
    AuthenticateStubUtil.authenticateStub(authenticationAdminClient.login(
            automationContext.getSuperTenant().
            getTenantAdmin().getUserName(), automationContext.getSuperTenant().
            getTenantAdmin().getPassword(),
            automationContext.getDefaultInstance().getHosts().get("default")), webappAdminStub);
    result.setMatchKey("specsResult");
    appList = getWebApplist("");
    jaggeryAppList();
    endpointList();
}
 
开发者ID:wso2,项目名称:carbon-platform-integration-utils,代码行数:23,代码来源:JaggeryServerTest.java


示例3: deploySynapseConfig

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
private void deploySynapseConfig() throws Exception {
	AuthenticatorClient authenticatorClient = new AuthenticatorClient(BACKEND_URL);
	ClientConnectionUtil.waitForPort(SERVER_PORT, HOST);
	ClientConnectionUtil.waitForLogin(context);// (SERVER_PORT, HOST,
	// BACKEND_URL);
	TimeUnit.SECONDS.sleep(15);
	String sessionCookie = authenticatorClient.login("admin", "admin",
			new URL(BACKEND_URL).getHost());

	String relativeFilePath = File.separator + "artifacts" + File.separator + "ESB"
			+ File.separator + "template" + File.separator + "httpEpTemplateTest.xml";
	relativeFilePath = relativeFilePath.replaceAll("[\\\\/]", File.separator);
	OMElement synapseConfig = esbUtils.loadResource(relativeFilePath);
	esbUtils.updateESBConfiguration(synapseConfig, BACKEND_URL, sessionCookie);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:16,代码来源:HttpEpTemplateWithSystemPropsTestCase.java


示例4: getSessionCookie

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
protected String getSessionCookie(AutomationContext context) throws RemoteException, XPathExpressionException,
        LoginAuthenticationExceptionException {
    AuthenticatorClient authenticationAdminClient = new AuthenticatorClient(context.getContextUrls().getBackEndUrl());
    String sessionCookie = authenticationAdminClient.login(automationContext.getSuperTenant().
            getTenantAdmin().getUserName(), automationContext.getSuperTenant().
            getTenantAdmin().getPassword(),
            automationContext.getDefaultInstance().getHosts().get("default"));

    return sessionCookie;
}
 
开发者ID:wso2-attic,项目名称:product-cdm,代码行数:11,代码来源:EMMIntegrationUiBaseTestCase.java


示例5: getSessionCookie

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
protected String getSessionCookie(AutomationContext context)
        throws RemoteException, XPathExpressionException, LoginAuthenticationExceptionException {
    AuthenticatorClient authenticationAdminClient = new AuthenticatorClient(context.getContextUrls().getBackEndUrl());
    return authenticationAdminClient.login(automationContext.getSuperTenant().
                                                   getTenantAdmin().getUserName(), automationContext.getSuperTenant().
                                                   getTenantAdmin().getPassword(),
                                           automationContext.getDefaultInstance().getHosts().get("default"));
}
 
开发者ID:wso2,项目名称:product-iots,代码行数:9,代码来源:IOTIntegrationUIBaseTestCase.java


示例6: getSessionCookie

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
protected String getSessionCookie(AutomationContext context) throws RemoteException, XPathExpressionException,
    LoginAuthenticationExceptionException {
    AuthenticatorClient authenticationAdminClient = new AuthenticatorClient(context.getContextUrls().getBackEndUrl());
    String sessionCookie = authenticationAdminClient.login(automationContext.getSuperTenant().
            getTenantAdmin().getUserName(), automationContext.getSuperTenant().
            getTenantAdmin().getPassword(),
            automationContext.getDefaultInstance().getHosts().get("default"));

    return sessionCookie;
}
 
开发者ID:wso2-attic,项目名称:product-emm,代码行数:11,代码来源:EMMIntegrationUiBaseTestCase.java


示例7: LoginLogoutClient

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
public LoginLogoutClient(AutomationContext context) throws AutomationUtilException {
    try {
        this.automationContext = context;
        String backendURL = context.getContextUrls().getBackEndUrl();
        this.loginClient = new AuthenticatorClient(backendURL);
    } catch (AxisFault axisFault) {
        throw new AutomationUtilException("Error while initializing authenticator client ", axisFault);
    } catch (XPathExpressionException e) {
        throw new AutomationUtilException("Error while retrieving backend URL from auto context ", e);
    }
}
 
开发者ID:wso2,项目名称:carbon-platform-integration-utils,代码行数:12,代码来源:LoginLogoutClient.java


示例8: login

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
private String login(String userName, String domain, char[] password, String backendUrl,
                     String hostName) throws
                                      RemoteException,
                                      LoginAuthenticationExceptionException,
                                      XPathExpressionException {
    AuthenticatorClient loginClient = new AuthenticatorClient(backendUrl);
    if (!domain.equals(AutomationConfiguration.getConfigurationValue(
            ExtensionCommonConstants.SUPER_TENANT_DOMAIN_NAME))) {
        userName += "@" + domain;
    }
    return loginClient.login(userName, String.valueOf(password), hostName);
}
 
开发者ID:wso2,项目名称:carbon-platform-integration-utils,代码行数:13,代码来源:UserPopulator.java


示例9: login

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
protected static String login(String userName, String password, String hostName)
        throws RemoteException, LoginAuthenticationExceptionException {
    AuthenticatorClient loginClient = new AuthenticatorClient(hostName);
    return loginClient.login(userName, password, hostName);
}
 
开发者ID:wso2,项目名称:product-es,代码行数:6,代码来源:RegistryUserCreator.java


示例10: serviceDeployment

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
    public void serviceDeployment() throws Exception {

        super.init();

        startupParameterMap = new HashMap<String, String>();
        startupParameterMap.put("-DportOffset", "1210");

        testServerManager = new DSSTestServerManager(dssContext, null, startupParameterMap) {

            public void configureServer() throws AutomationFrameworkException {

                try {
                    File sourceFile = new File(getResourceLocation() + File.separator + "serverConfigs" + File.separator
                            + getParameter("shFilename"));
//                    File destinationFile = new File(testServerManager.getCarbonHome() + File.separator + "bin" + File.separator + "wso2server.sh");

                    //copying wso2server.sh file to bin folder
                    FileManager.copyFile(sourceFile, this.getCarbonHome() + File.separator + "bin" + File.separator + "wso2server.sh");


                } catch (IOException e) {
                    throw new AutomationFrameworkException(e.getMessage(), e);
                } catch (XPathExpressionException e) {
                    throw new AutomationFrameworkException(e.getMessage(), e);
                }

            }
        };

        testServerManager.setParameter("shFilename", "wso2server.sh");

        String testServerCarbonHome = testServerManager.startServer();

        backupUserDir = System.getProperty("user.dir");
        backupCarbonHome = System.getProperty("carbon.home");

        System.out.println("****************  back up user dir   " + backupUserDir);
        System.out.println("****************  back up carbonhome " + backupCarbonHome);


        System.setProperty("carbon.home", testServerCarbonHome);
//        System.setProperty("user.dir", testServerCarbonHome);

        loginClient = new AuthenticatorClient(backendUrl);
        sessionCookie = loginClient.login(userInfo.getUserName(), userInfo.getPassword(), "localhost");

        List<File> sqlFileLis = new ArrayList<File>();
        sqlFileLis.add(selectSqlFile("CreateTableWithTimeStamp.sql"));
        deployService(serviceName,
                createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator
                        + "rdbms" + File.separator + "h2" + File.separator
                        + serviceName + ".dbs", sqlFileLis));

//        backendUrl = dssContext.getContextUrls().getBackEndUrl();

        insertTimeStampToDb("Insert With America/New_York Time Zone", "1970-01-02T12:00:00.000+02:00");

        testServerManager.stopServer();

        testServerManager.removeParameter("shFilename");
        testServerManager.setParameter("shFilename", "wso2server1.sh");
        testServerManager.configureServer();
        testServerManager.startServer();
        sessionCookie = loginClient.login(userInfo.getUserName(), userInfo.getPassword(), "localhost");

        insertTimeStampToDb("Insert With America/New_York Time Zone", "1970-01-02T12:00:00.000+02:00");

    }
 
开发者ID:wso2,项目名称:product-ei,代码行数:70,代码来源:DS1069DifferentTimeStampStoreIssueTestCase.java


示例11: serviceDeployment

import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void serviceDeployment() throws Exception {

    super.init();

    startupParameterMap = new HashMap<String, String>();
    startupParameterMap.put("-DportOffset", "1210");

    testServerManager = new DSSTestServerManager(dssContext, null, startupParameterMap) {

        public void configureServer() throws AutomationFrameworkException {

            try {
                File sourceFile = new File(getResourceLocation() + File.separator + "serverConfigs" + File.separator
                        + getParameter("shFilename"));

                //copying wso2server.sh file to bin folder
                FileManager.copyFile(sourceFile, this.getCarbonHome() + File.separator + "bin" + File.separator + "wso2server.sh");


            } catch (IOException e) {
                throw new AutomationFrameworkException(e.getMessage(), e);
            } catch (XPathExpressionException e) {
                throw new AutomationFrameworkException(e.getMessage(), e);
            }

        }
    };

    testServerManager.setParameter("shFilename", "wso2serverLegacyMode.sh");

    String testServerCarbonHome = testServerManager.startServer();

    backupUserDir = System.getProperty("user.dir");
    backupCarbonHome = System.getProperty("carbon.home");

    System.out.println("****************  back up user dir   " + backupUserDir);
    System.out.println("****************  back up carbonhome " + backupCarbonHome);


    System.setProperty("carbon.home", testServerCarbonHome);

    loginClient = new AuthenticatorClient(backendUrl);
    sessionCookie = loginClient.login(userInfo.getUserName(), userInfo.getPassword(), "localhost");

    List<File> sqlFileLis = new ArrayList<File>();
    sqlFileLis.add(selectSqlFile("CreateTableTimeStamp.sql"));
    deployService(serviceName,
            createArtifact(getResourceLocation() + File.separator + "dbs" + File.separator
                    + "rdbms" + File.separator + "h2" + File.separator
                    + serviceName + ".dbs", sqlFileLis));

    insertTimeStampToDb("Insert With America/New_York Time Zone", "1970-01-02T12:00:00.000+02:00");

    testServerManager.stopServer();
    testServerManager.removeParameter("shFilename");
    testServerManager.setParameter("shFilename", "wso2serverLegacyMode1.sh");
    testServerManager.configureServer();
    testServerManager.startServer();

    sessionCookie = loginClient.login(userInfo.getUserName(), userInfo.getPassword(), "localhost");

    insertTimeStampToDb("Insert With UTC Time Zone", "1970-01-02T12:00:00.000+02:00");

}
 
开发者ID:wso2,项目名称:product-ei,代码行数:66,代码来源:DS1189LeagyTimeStampModeTestCase.java



注:本文中的org.wso2.carbon.integration.common.admin.client.AuthenticatorClient类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BasicClientCookie类代码示例发布时间:2022-05-22
下一篇:
Java ServerSetup类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap