Package org.picketlink.idm.api

Examples of org.picketlink.idm.api.User


    // Not @Inject: here it is created and outjected
    private RulesRepository rulesRepository;

    @PostConstruct
    public void createRulesRepository() {
        User user = identity.getUser();
        String username;
        // TODO user should never be null, weld messes up the identity proxy?
        if (user == null) {
            log.warn("Creating RulesRepository with default username.");
            // Do not use user name "anonymous" as this user is configured in JackRabbit SimpleLoginModule
            // with limited privileges. In Guvnor, access control is done in a higher level.
            username = DEFAULT_USERNAME;
        } else {
            username = user.getId();
        }
        doSecurityContextAssociation();
        rulesRepository = new RulesRepository(repositoryStartupService.newSession(username));
    }
View Full Code Here


            // TODO - add control message
            //StatusMessages.instance().addToControl("password", "Passwords do not match");
            return "failure";
        }

        User user = identitySession.getPersistenceManager().createUser(username);
        identitySession.getAttributesManager().updatePassword(user, password);

        for (Role role : roles) {
            identitySession.getRoleManager().createRole(role.getRoleType(), user, role.getGroup());
        }
View Full Code Here

        return "success";
    }

    private String saveExistingUser() throws IdentityException, FeatureNotSupportedException {
        User user = identitySession.getPersistenceManager().findUser(username);

        // Check if a new password has been entered
        if (password != null && !"".equals(password)) {
            if (!password.equals(confirm)) {
                // TODO - add control message
View Full Code Here

TOP

Related Classes of org.picketlink.idm.api.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.