Examples of tenantId()


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

            .add(managerRole);

        boolean authorized =
                DomainRegistry
                    .authorizationService()
                    .isUserInRole(tenant.tenantId(), user.username(), "Manager");

        assertTrue(authorized);

        authorized =
                DomainRegistry
View Full Code Here

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

        assertTrue(authorized);

        authorized =
                DomainRegistry
                    .authorizationService()
                    .isUserInRole(tenant.tenantId(), user.username(), "Director");

        assertFalse(authorized);
    }
}
View Full Code Here

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

    public void testProvisionRole() throws Exception {
        Tenant tenant = this.tenantAggregate();
        Role role = tenant.provisionRole("Manager", "A manager role.");
        DomainRegistry.roleRepository().add(role);
        assertEquals(1, DomainRegistry.roleRepository().allRoles(tenant.tenantId()).size());
    }

    public void testRoleUniqueness() throws Exception {
        Tenant tenant = this.tenantAggregate();
        Role role1 = tenant.provisionRole("Manager", "A manager role.");
View Full Code Here

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

            System.out.println("GROUP REPOSITORY: " + DomainRegistry.groupRepository());

            DomainRegistry
                .groupRepository()
                .groupNamed(
                        tenant.tenantId(),
                        roleA.group().name());

            fail("Should have thrown exception for invalid group name.");

        } catch (Exception e) {
View Full Code Here

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

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

        System.out.println(">>> GET: " + url);
        ClientRequest request = new ClientRequest(url);
        request.pathParameter("tenantId", tenant.tenantId().id());
        String output = request.getTarget(String.class);
        System.out.println(output);

        RepresentationReader reader = new RepresentationReader(output);
View Full Code Here

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

        ApplicationServiceRegistry
            .accessApplicationService()
            .assignUserToRole(
                    new AssignUserToRoleCommand(
                            user.tenantId().id(),
                            user.username(),
                            role.name()));

        assertTrue(role.isInRole(user, DomainRegistry.groupMemberService()));
    }
View Full Code Here

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

        assertFalse(
                ApplicationServiceRegistry
                    .accessApplicationService()
                    .isUserInRole(
                            user.tenantId().id(),
                            user.username(),
                            role.name()));

        ApplicationServiceRegistry
            .accessApplicationService()
View Full Code Here

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

        ApplicationServiceRegistry
            .accessApplicationService()
            .assignUserToRole(
                    new AssignUserToRoleCommand(
                            user.tenantId().id(),
                            user.username(),
                            role.name()));

        assertTrue(
                ApplicationServiceRegistry
View Full Code Here

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

        assertTrue(
                ApplicationServiceRegistry
                    .accessApplicationService()
                    .isUserInRole(
                            user.tenantId().id(),
                            user.username(),
                            role.name()));
    }

    public void testUserInRole() throws Exception {
View Full Code Here

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

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

        System.out.println(">>> GET: " + url);
        ClientRequest request = new ClientRequest(url);
        request.pathParameter("tenantId", user.tenantId().id());
        request.pathParameter("username", user.username());
        request.pathParameter("password", FIXTURE_PASSWORD);

        String output = request.getTarget(String.class);
        System.out.println(output);
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.