Examples of UserDescriptor


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

        group.addUser(user);
    }

    @Transactional(readOnly=true)
    public UserDescriptor authenticateUser(AuthenticateUserCommand aCommand) {
        UserDescriptor userDescriptor =
                this.authenticationService()
                    .authenticate(
                        new TenantId(aCommand.getTenantId()),
                        aCommand.getUsername(),
                        aCommand.getPassword());
View Full Code Here

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

    @Transactional(readOnly=true)
    public UserDescriptor userDescriptor(
            String aTenantId,
            String aUsername) {

        UserDescriptor userDescriptor = null;

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

        if (user != null) {
            userDescriptor = user.userDescriptor();
View Full Code Here

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

    protected UserInRoleRepresentation() {
        super();
    }

    private void initializeFrom(User aUser, String aRole) {
        UserDescriptor desc = aUser.userDescriptor();
        this.setEmailAddress(desc.emailAddress());
        this.setFirstName(aUser.person().name().firstName());
        this.setLastName(aUser.person().name().lastName());
        this.setRole(aRole);
        this.setTenantId(desc.tenantId().id());
        this.setUsername(desc.username());
    }
View Full Code Here

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

            @PathParam("tenantId") String aTenantId,
            @PathParam("username") String aUsername,
            @PathParam("password") String aPassword,
            @Context Request aRequest) {

        UserDescriptor userDescriptor =
                this.identityApplicationService()
                    .authenticateUser(
                            new AuthenticateUserCommand(
                                    aTenantId,
                                    aUsername,
                                    aPassword));

        if (userDescriptor.isNullDescriptor()) {
            throw new WebApplicationException(Response.Status.NOT_FOUND);
        }

        Response response = this.userDescriptorResponse(aRequest, userDescriptor);
View Full Code Here

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

    public void testAuthenticateUser() throws Exception {
        User user = this.userAggregate();
        DomainRegistry.userRepository().add(user);

        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

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

                            user.tenantId().id(),
                            user.username(),
                            FIXTURE_PASSWORD,
                            "THIS.IS.JOE'S.NEW.PASSWORD"));

        UserDescriptor userDescriptor =
                ApplicationServiceRegistry
                    .identityApplicationService()
                    .authenticateUser(new AuthenticateUserCommand(
                            user.tenantId().id(),
                            user.username(),
                            "THIS.IS.JOE'S.NEW.PASSWORD"));

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

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

    public void testQueryUserDescriptor() throws Exception {
        User user = this.userAggregate();
        DomainRegistry.userRepository().add(user);

        UserDescriptor queriedUserDescriptor =
                ApplicationServiceRegistry
                    .identityApplicationService()
                    .userDescriptor(user.tenantId().id(), user.username());

        assertNotNull(user);
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.UserDescriptor

            ** We tell the data dictionary we're done writing at the end of
            ** the transaction.
            */
            dd.startWriting(lcc);

            UserDescriptor  userDescriptor = makeUserDescriptor( dd, tc, userName, password );

            dd.addDescriptor( userDescriptor, null, DataDictionary.SYSUSERS_CATALOG_NUM, false, tc );

            // turn on NATIVE::LOCAL authentication
            if ( dd.getAuthorizationDatabaseOwner().equals( userName ) )
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.UserDescriptor

        String  hashingScheme = hasher.encodeHashingScheme();
        String  hashedPassword = hasher.hashPasswordIntoString( userName, password );
           
        Timestamp   currentTimestamp = new Timestamp( (new java.util.Date()).getTime() );

        UserDescriptor  userDescriptor = ddg.newUserDescriptor
            ( userName, hashingScheme, hashedPassword.toCharArray(), currentTimestamp );

        return userDescriptor;
    }
View Full Code Here

Examples of org.apache.derby.iapi.sql.dictionary.UserDescriptor

            ** We tell the data dictionary we're done writing at the end of
            ** the transaction.
            */
            dd.startWriting(lcc);

            UserDescriptor  userDescriptor = makeUserDescriptor( dd, tc, userName, password );

            dd.updateUser( userDescriptor, tc );
           
        } catch (StandardException se) { throw PublicAPI.wrapStandardException(se); }
    }
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.