当前位置: 首页>>代码示例>>Java>>正文


Java LoginAuthenticationExceptionException类代码示例

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


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

示例1: deployArrService

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
public static void deployArrService(String backEndUrl, String sessionCookie, String serviceName,
                             String serviceFilePath, int deploymentDelay)
        throws RemoteException, MalformedURLException, LoginAuthenticationExceptionException, org.wso2.carbon.aarservices.stub.ExceptionException {

    AARServiceUploaderClient adminServiceAARServiceUploader =
            new AARServiceUploaderClient(backEndUrl, sessionCookie);
    ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
    if (adminServiceService.isServiceExists(serviceName)) {
        adminServiceService.deleteService(new String[]{serviceName});
        isServiceUnDeployed(backEndUrl, sessionCookie, serviceName, deploymentDelay);
    }

    adminServiceAARServiceUploader.uploadAARFile(serviceName + ".aar", serviceFilePath, "");
    Assert.assertTrue(isServiceDeployed(backEndUrl, sessionCookie, serviceName, deploymentDelay)
            , serviceName + " deployment failed in Application Server");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:17,代码来源:ServiceDeploymentUtil.java

示例2: testDeleteStudent

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "DELETE request  by invalid user",
      dependsOnMethods = "testUpdateStudent")
public void testDeleteStudent() throws IOException, EndpointAdminEndpointAdminException,
                                       LoginAuthenticationExceptionException,
                                       XMLStreamException {
    boolean status = false;
    HttpsResponse response = null;

    String securedRestURL = (getProxyServiceURLHttps(SERVICE_NAME)) + "/student/" + studentName;
    try {
        response =
                HttpsURLConnectionClient.deleteWithBasicAuth(securedRestURL, null, "InvalidUser",
                                                             "InvalidPassword");
    } catch (IOException ignored) {
        status = true; // invalid users cannot get the resource
    }
    assertTrue(status, "Invalid user was able to get the resource");
    assertNull(response, "Response should be null");

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

示例3: testGetResourceAfterDelete

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "GET resource after delete  by invalid user",
      dependsOnMethods = "testDeleteStudent")
public void testGetResourceAfterDelete()
        throws IOException, EndpointAdminEndpointAdminException,
               LoginAuthenticationExceptionException,
               XMLStreamException {

    //check whether the student is deleted
    String studentGetUri = (getProxyServiceURLHttps(SERVICE_NAME)) + "/student/" + studentName;
    boolean getStatus = false;
    HttpsResponse getResponse = null;
    try {
        getResponse =
                HttpsURLConnectionClient.getWithBasicAuth(studentGetUri, null, userInfo.getPassword(),
                                                          userInfo.getPassword());
    } catch (IOException ignored) {
        getStatus = true; // invalid users cannot get the resource
    }

    assertTrue(getStatus, "User belongs to invalid group was able to get the resource");
    assertNull(getResponse, "Response should be null");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:23,代码来源:ESBPOXSecurityByInvalidUserTestCase.java

示例4: testDeleteStudent

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "DELETE request by valid user", dependsOnMethods = "testUpdateStudent")
public void testDeleteStudent() throws IOException, EndpointAdminEndpointAdminException,
                                       LoginAuthenticationExceptionException,
                                       XMLStreamException {


    String deleteStudentData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                               "<p:deleteStudent xmlns:p=\"http://axis2.apache.org\">\n" +
                               "      <!--0 to 1 occurrence-->\n" +
                               "      <xs:name xmlns:xs=\"http://axis2.apache.org\">" + studentName + "</xs:name>\n" +
                               "</p:deleteStudent>";

    String securedRestURL = (getProxyServiceURLHttps(SERVICE_NAME)) + "/student/" + studentName;
    HttpsResponse response =
            HttpsURLConnectionClient.deleteWithBasicAuth(securedRestURL, null, userInfo.getUserName(),
                                                         userInfo.getPassword());
    assertTrue(!response.getData().contains(studentName)
            , "response doesn't contain the expected output");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:ESBPOXSecurityByUserTestCase.java

示例5: testDeleteStudent

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "DELETE request by user belongs to unauthorized group",
      dependsOnMethods = "testUpdateStudent")
public void testDeleteStudent() throws IOException, EndpointAdminEndpointAdminException,
                                       LoginAuthenticationExceptionException,
                                       XMLStreamException {

    String securedRestURL = getProxyServiceURLHttps(SERVICE_NAME) + "/student/" + studentName;
    boolean status = false;
    HttpsResponse response = null;
    try {
        response =
                HttpsURLConnectionClient.deleteWithBasicAuth(securedRestURL, null, NonAdminUserCreationTestCase.getUser().getUserName(),
                                                             NonAdminUserCreationTestCase.getUser().getPassword());
    } catch (IOException ignored) {
        status = true; // invalid users cannot delete to the resource
    }

    assertTrue(status, "User belongs to invalid group was able to delete the resource");
    assertNull(response, "Response should be null");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:21,代码来源:ESBPOXSecurityWithInvalidGroupTestCase.java

示例6: testGetResourceAfterDelete

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "GET resource after delete by user belongs to unauthorized group",
      dependsOnMethods = "testDeleteStudent")
public void testGetResourceAfterDelete()
        throws IOException, EndpointAdminEndpointAdminException,
               LoginAuthenticationExceptionException,
               XMLStreamException {

    //check whether the student is deleted
    String studentGetUri = getProxyServiceURLHttps(SERVICE_NAME) + "/student/" + studentName;
    boolean getStatus = false;
    HttpsResponse getResponse = null;
    try {
        getResponse =
                HttpsURLConnectionClient.getWithBasicAuth(studentGetUri, null, NonAdminUserCreationTestCase.getUser().getPassword(),
                                                          NonAdminUserCreationTestCase.getUser().getPassword());
    } catch (IOException ignored) {
        getStatus = true; // invalid users cannot get the resource
    }

    assertTrue(getStatus, "User belongs to invalid group was able to get the resource");
    assertNull(getResponse, "Response should be null");
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:23,代码来源:ESBPOXSecurityWithInvalidGroupTestCase.java

示例7: unDeployServices

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@AfterTest(alwaysRun = true)
public void unDeployServices()
        throws IOException, LoginAuthenticationExceptionException, ExceptionException,
        XPathExpressionException, URISyntaxException, SAXException, XMLStreamException, AutomationUtilException {
    if (TestConfigurationProvider.isIntegration() && axis2Server1 != null && axis2Server1.isStarted()) {
        axis2Server1.stop();
    } else {
        AutomationContext asContext = new AutomationContext("AS", TestUserMode.SUPER_TENANT_ADMIN);
        int deploymentDelay = TestConfigurationProvider.getServiceDeploymentDelay();
        String serviceName = "SecureStockQuoteServiceScenario";
        ServiceDeploymentUtil deployer = new ServiceDeploymentUtil();
        LoginLogoutClient loginLogoutClient = new LoginLogoutClient(asContext);
        for (int i = 1; i < 9; i++) {
            deployer.unDeployArrService(asContext.getContextUrls().getBackEndUrl(), loginLogoutClient.login()
                    , serviceName + i, deploymentDelay);
        }

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

示例8: testSendingToLoaBalancingEndpoint

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@SetEnvironment(executionEnvironments = {ExecutionEnvironment.STANDALONE})
@Test(groups = {"wso2.esb"}, description = "Sending a Message to a loadbalancing endpoint")
public void testSendingToLoaBalancingEndpoint()
        throws IOException, EndpointAdminEndpointAdminException,
               LoginAuthenticationExceptionException,
               XMLStreamException {

    String response = lbClient.sendLoadBalanceRequest(getProxyServiceURLHttp("loadbalancingEndPoint"),
                                                      null);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.toString().contains("Response from server: Server_1"));

    response = lbClient.sendLoadBalanceRequest(getProxyServiceURLHttp("loadbalancingEndPoint"),
                                               null);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.toString().contains("Response from server: Server_2"));

    response = lbClient.sendLoadBalanceRequest(getProxyServiceURLHttp("loadbalancingEndPoint"),
                                               null);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.toString().contains("Response from server: Server_3"));

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

示例9: testSendingToLoaBalancingEndpoint_ConfigReg

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@SetEnvironment(executionEnvironments = {ExecutionEnvironment.STANDALONE})
@Test(groups = {"wso2.esb"}, description = "Sending a Message to a loadbalancing endpoint in Config Reg")
public void testSendingToLoaBalancingEndpoint_ConfigReg()
        throws IOException, EndpointAdminEndpointAdminException,
               LoginAuthenticationExceptionException,
               XMLStreamException {

    String response = lbClient.sendLoadBalanceRequest(getProxyServiceURLHttp("loadbalancingEndPoint_Config_Reg"),
                                                      null);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.toString().contains("Response from server: Server_1"));

    response = lbClient.sendLoadBalanceRequest(getProxyServiceURLHttp("loadbalancingEndPoint_Config_Reg"),
                                               null);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.toString().contains("Response from server: Server_2"));

    response = lbClient.sendLoadBalanceRequest(getProxyServiceURLHttp("loadbalancingEndPoint_Config_Reg"),
                                               null);
    Assert.assertNotNull(response);
    Assert.assertTrue(response.toString().contains("Response from server: Server_3"));

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

示例10: waitForLogin

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
/**
 * Wait for sometime until it is possible to login to the Carbon server
 */
public static void waitForLogin(AutomationContext context)
        throws MalformedURLException, LoginAuthenticationExceptionException {
    long startTime = System.currentTimeMillis();
    boolean loginFailed = true;
    while (((System.currentTimeMillis() - startTime) < TIMEOUT) && loginFailed) {
        log.info("Waiting to login  user...");
        try {
            LoginLogoutClient loginClient = new LoginLogoutClient(context);
            loginClient.login();
            loginFailed = false;
        } catch (Exception e) {
            if (log.isDebugEnabled()) {
                log.debug("Login failed after server startup", e);
            }
            try {
                Thread.sleep(2000);
            } catch (InterruptedException ignored) {
                // Nothing to do
            }
        }
    }
}
 
开发者ID:wso2,项目名称:carbon-platform-integration-utils,代码行数:26,代码来源:ClientConnectionUtil.java

示例11: init

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的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

示例12: login

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
public String login(String userName, String password, String host)
        throws LoginAuthenticationExceptionException, RemoteException {
    Boolean loginStatus;
    ServiceContext serviceContext;
    String sessionCookie;
    loginStatus = authenticationAdminStub.login(userName, password, host);
    if (!loginStatus) {
        throw new LoginAuthenticationExceptionException("Login Unsuccessful. Return false as a login status by Server");
    }
    log.info("Login Successful");
    serviceContext = authenticationAdminStub._getServiceClient().getLastOperationContext().getServiceContext();
    sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
    if (log.isDebugEnabled()) {
        log.debug("SessionCookie :" + sessionCookie);
    }
    return sessionCookie;
}
 
开发者ID:wso2,项目名称:carbon-platform-integration-utils,代码行数:18,代码来源:AuthenticatorClient.java

示例13: login

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
public String login(String userName, String password, String host)
        throws LoginAuthenticationExceptionException, RemoteException {
    Boolean loginStatus;
    ServiceContext serviceContext;
    String sessionCookie;

    loginStatus = authenticationAdminStub.login(userName, password, host);

    if (!loginStatus) {
        throw new LoginAuthenticationExceptionException("Login Unsuccessful. Return false as a login status by Server");
    }
    log.info("Login Successful");
    serviceContext = authenticationAdminStub._getServiceClient().getLastOperationContext().getServiceContext();
    sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
    if (log.isDebugEnabled()) {
        log.debug("SessionCookie :" + sessionCookie);
    }
    return sessionCookie;
}
 
开发者ID:wso2,项目名称:product-es,代码行数:20,代码来源:AuthenticatorClient.java

示例14: testCreateInstance

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.bps", "wso2.bps.manage"}, description = "Set service to Active State", priority = 1)
public void testCreateInstance()
        throws InterruptedException, XMLStreamException, RemoteException,
        ProcessManagementException, InstanceManagementException, LoginAuthenticationExceptionException {
    EndpointReference epr = new EndpointReference(backEndUrl + "PickService");
    requestSender.sendRequest("<pic:dealDeck xmlns:pic=\"http://www.stark.com/PickService\">" +
            "   <pic:Deck>testPick</pic:Deck>" +
            "</pic:dealDeck>", epr);

    PaginatedInstanceList instanceList = bpelInstanceManagementClient.filterPageInstances(bpelProcessManagementClient.getProcessId("PickProcess"));
    instanceInfo = instanceList.getInstance()[0];
    if (instanceList.getInstance().length == 0) {
        Assert.fail("Instance failed to create");
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:16,代码来源:BpelInstanceManagementTest.java

示例15: testDeleteInstance

import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; //导入依赖的package包/类
@Test(groups = {"wso2.bps", "wso2.bps.manage"}, description = "Delete the instance", dependsOnMethods = "testTerminateInstance")
public void testDeleteInstance()
        throws InterruptedException, InstanceManagementException, RemoteException, LoginAuthenticationExceptionException {

    bpelInstanceManagementClient.deleteInstance(instanceInfo.getIid());
    Thread.sleep(5000);
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:8,代码来源:BpelInstanceManagementTest.java


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