Package com.saasovation.identityaccess.domain.model.identity

Examples of com.saasovation.identityaccess.domain.model.identity.User.tenantId()


        Tenant tenant = this.tenantAggregate();
        User user = this.userAggregate();
        DomainRegistry.userRepository().add(user);
        Role managerRole = tenant.provisionRole("Manager", "A manager role.", true);
        Group group = new Group(user.tenantId(), "Managers", "A group of managers.");
        DomainRegistry.groupRepository().add(group);
        managerRole.assignGroup(group, DomainRegistry.groupMemberService());
        managerRole.assignUser(user);
        DomainRegistry.roleRepository().add(managerRole);
        group.addUser(user); // legal add
View Full Code Here


        Tenant tenant = this.tenantAggregate();
        User user = this.userAggregate();
        DomainRegistry.userRepository().add(user);
        Role managerRole = tenant.provisionRole("Manager", "A manager role.", true);
        Group group = new Group(user.tenantId(), "Managers", "A group of managers.");
        DomainRegistry.groupRepository().add(group);
        managerRole.assignUser(user);
        managerRole.assignGroup(group, DomainRegistry.groupMemberService());
        DomainRegistry.roleRepository().add(managerRole);
View Full Code Here

        String url = "http://localhost:" + PORT + "/tenants/{tenantId}/users/{username}";

        System.out.println(">>> GET: " + url);
        ClientRequest request = new ClientRequest(url);
        request.pathParameter("tenantId", user.tenantId().id());
        request.pathParameter("username", user.username() + "!");
        ClientResponse<String> response = request.get(String.class);
        assertTrue(response.getStatus() == 404 || response.getStatus() == 500);
    }
View Full Code Here

        String url = "http://localhost:" + PORT + "/tenants/{tenantId}/users/{username}/inRole/{role}";

        System.out.println(">>> GET: " + url);
        ClientRequest request = new ClientRequest(url);
        request.pathParameter("tenantId", user.tenantId().id());
        request.pathParameter("username", user.username());
        request.pathParameter("role", role.name());
        ClientResponse<String> response = request.get(String.class);
        assertEquals(200, response.getStatus());
        String entity = response.getEntity();
View Full Code Here

        String url = "http://localhost:" + PORT + "/tenants/{tenantId}/users/{username}/inRole/{role}";

        System.out.println(">>> GET: " + url);
        ClientRequest request = new ClientRequest(url);
        request.pathParameter("tenantId", user.tenantId().id());
        request.pathParameter("username", user.username());
        request.pathParameter("role", role.name());
        ClientResponse<String> response = request.get(String.class);
        assertEquals(204, response.getStatus());
    }
View Full Code Here

        UserDescriptor userDescriptor =
                ApplicationServiceRegistry
                    .identityApplicationService()
                    .authenticateUser(new AuthenticateUserCommand(
                            user.tenantId().id(),
                            user.username(),
                            FIXTURE_PASSWORD));

        assertNotNull(userDescriptor);
        assertEquals(user.username(), userDescriptor.username());
View Full Code Here

        ApplicationServiceRegistry
            .identityApplicationService()
            .changeUserContactInformation(
                    new ChangeContactInfoCommand(
                            user.tenantId().id(),
                            user.username(),
                            "mynewemailaddress@saasovation.com",
                            "777-555-1211",
                            "777-555-1212",
                            "123 Pine Street",
View Full Code Here

        ApplicationServiceRegistry
            .identityApplicationService()
            .changeUserEmailAddress(
                    new ChangeEmailAddressCommand(
                            user.tenantId().id(),
                            user.username(),
                            "mynewemailaddress@saasovation.com"));

        User changedUser =
                DomainRegistry
View Full Code Here

        ApplicationServiceRegistry
            .identityApplicationService()
            .changeUserPostalAddress(
                    new ChangePostalAddressCommand(
                            user.tenantId().id(),
                            user.username(),
                            "123 Pine Street",
                            "Loveland",
                            "CO",
                            "80771",
View Full Code Here

        ApplicationServiceRegistry
            .identityApplicationService()
            .changeUserPrimaryTelephone(
                    new ChangePrimaryTelephoneCommand(
                            user.tenantId().id(),
                            user.username(),
                            "777-555-1211"));

        User changedUser =
                DomainRegistry
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.