Package org.openengsb.connector.usernamepassword

Examples of org.openengsb.connector.usernamepassword.Password


        MethodCall methodCall = new MethodCall("createWithId", new Object[]{ connectorId, connectorDescription });
        Map<String, String> metaData = new HashMap<String, String>();
        metaData.put("serviceId", "connectorManager");
        methodCall.setMetaData(metaData);
        MethodCallMessage methodCallRequest = new MethodCallMessage(methodCall, false);
        BeanDescription auth = BeanDescription.fromObject(new Password("password"));
        methodCallRequest.setPrincipal("admin");
        methodCallRequest.setCredentials(auth);

        ObjectMapper mapper = new ObjectMapper();
        return mapper.writerWithDefaultPrettyPrinter().writeValueAsString(methodCallRequest);
View Full Code Here


    public void testCheckinUser_shouldCreateUserInDbAndDataManager() throws ExecutionException {

        SecurityContext.executeWithSystemPermissions(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                authenticationContext.login("admin", new Password("password"));

                User user = new User(userName);

                Attribute attr = new Attribute();
                attr.setAttributeName(attrName);
View Full Code Here

        SecurityContext.executeWithSystemPermissions(new Callable<Object>() {
            @Override
            public Object call() throws Exception {

                authenticationContext.login("admin", new Password("password"));

                User user = new User(userName);
                Attribute attr = new Attribute();
                attr.setAttributeName(attrName);
                attr.getValues().add(attrValue);
View Full Code Here

        MethodCall methodCall = new MethodCall("delete", new Object[]{ connectorId });
        Map<String, String> metaData = new HashMap<String, String>();
        metaData.put("serviceId", "connectorManager");
        methodCall.setMetaData(metaData);
        MethodCallMessage methodCallRequest = new MethodCallMessage(methodCall, false);
        BeanDescription auth = BeanDescription.fromObject(new Password("password"));
        methodCallRequest.setPrincipal("admin");
        methodCallRequest.setCredentials(auth);
        ObjectMapper mapper = new ObjectMapper();
        String writeValueAsString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(methodCallRequest);
        System.out.println(writeValueAsString);
View Full Code Here

            "tcp://127.0.0.1:%s?example-remote" });
        Map<String, String> metaData = new HashMap<String, String>();
        metaData.put("serviceId", "connectorManager");
        methodCall.setMetaData(metaData);
        MethodCallMessage methodCallRequest = new MethodCallMessage(methodCall, false);
        BeanDescription auth = BeanDescription.fromObject(new Password("password"));
        methodCallRequest.setPrincipal("admin");
        methodCallRequest.setCredentials(auth);

        ObjectMapper mapper = new ObjectMapper();
        String writeValueAsString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(methodCallRequest);
View Full Code Here

                EKBCommit commit = buildCommit((List) localModels, (List) newModels);
                commit.setConnectorId("filewatcher");
                commit.setInstanceId(instanceId);
                commit.setDomainId(domainType);
                ContextHolder.get().setCurrentContextId("foo");
                authenticationContext.login("admin", new Password("password"));
                persistService.commit(commit);
                authenticationContext.logout();
            }
        };
        if (watchfile.exists()) {
View Full Code Here

    }

    @Override
    public void syncFromJiraServerToOpenEngSB(JiraClient jiraClient) {
        modelManager = new DefaultModelManager(jiraClient);
        authenticationContext.login("admin", new Password("password"));
        syncUsers();
        syncProjects();
        syncAssignments();
    }
View Full Code Here

    }

    @Override
    public boolean authenticate(String username, String password) {
        try {
            authenticationContext.login(username, new Password(password));
        } catch (AuthenticationException e) {
            LOGGER.error("Authentication failed");
            LOGGER.info("Reason: ", e);
            return false;
        }
View Full Code Here

        this.authenticationContext = authenticationContext;
    }

    @Override
    public void syncFromLdapServerToOpenEngSB(LdapDao ldapDao) {
        authenticationContext.login("admin", new Password("password"));
        modelManager = new DefaultModelManager(ldapDao);
        syncUsers();
        syncProjects();
        syncRoles();
        syncAssignments();
View Full Code Here

TOP

Related Classes of org.openengsb.connector.usernamepassword.Password

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.