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

Examples of com.saasovation.identityaccess.domain.model.identity.User


        Tenant tenant = this.tenantAggregate();

        RegistrationInvitation registrationInvitation =
            this.registrationInvitationEntity(tenant);

        User user =
            tenant.registerUser(
                    registrationInvitation.invitationId(),
                    FIXTURE_USERNAME2,
                    FIXTURE_PASSWORD,
                    new Enablement(true, null, null),
View Full Code Here


        Tenant tenant = this.tenantAggregate();

        RegistrationInvitation invitation =
                tenant.offerRegistrationInvitation("open-ended").openEnded();

        User user =
                tenant.registerUser(
                        invitation.invitationId(),
                        "jdoe",
                        FIXTURE_PASSWORD,
                        Enablement.indefiniteEnablement(),
View Full Code Here

                       .next()
                       .invitationId();

        for (int idx = 0; idx < 25; ++idx) {

            User user =
                ApplicationServiceRegistry
                    .identityApplicationService()
                    .registerUser(
                        new RegisterUserCommand(
                                tenant.tenantId().id(),
                                invitationId,
                                FIXTURE_USERNAME + idx,
                                FIXTURE_PASSWORD,
                                "Zoe",
                                "Doe",
                                true,
                                null,
                                null,
                                person.contactInformation().emailAddress().address(),
                                person.contactInformation().primaryTelephone().number(),
                                person.contactInformation().secondaryTelephone().number(),
                                person.contactInformation().postalAddress().streetAddress(),
                                person.contactInformation().postalAddress().city(),
                                person.contactInformation().postalAddress().stateProvince(),
                                person.contactInformation().postalAddress().postalCode(),
                                person.contactInformation().postalAddress().countryCode()));

            if ((idx % 2) == 0) {
                PersonNameChanged event =
                        new PersonNameChanged(
                                user.tenantId(),
                                user.username(),
                                user.person().name());

                this.eventStore.append(event);
            }

            if ((idx % 3) == 0) {
                UserPasswordChanged event =
                        new UserPasswordChanged(
                                user.tenantId(),
                                user.username());

                this.eventStore.append(event);
            }

            DomainEventPublisher.instance().reset();
View Full Code Here

    public boolean isUserInRole(TenantId aTenantId, String aUsername, String aRoleName) {
        this.assertArgumentNotNull(aTenantId, "TenantId must not be null.");
        this.assertArgumentNotEmpty(aUsername, "Username must not be provided.");
        this.assertArgumentNotEmpty(aRoleName, "Role name must not be null.");

        User user = this.userRepository().userWithUsername(aTenantId, aUsername);

        return user == null ? false : this.isUserInRole(user, aRoleName);
    }
View Full Code Here

TOP

Related Classes of com.saasovation.identityaccess.domain.model.identity.User

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.