Examples of SimpleUser


Examples of org.picketlink.idm.impl.api.model.SimpleUser

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (Exception e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (Exception e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (Exception e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

      if ("demo".equals(credentials.getUsername()) &&
            credentials.getCredential() instanceof PasswordCredential &&
            "demo".equals(((PasswordCredential) credentials.getCredential()).getValue()))
      {
         setStatus(AuthenticationStatus.SUCCESS);
         setUser(new SimpleUser("demo"));
      }
      else
      {
         setStatus(AuthenticationStatus.FAILURE);
      }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

            setStatus(AuthenticationStatus.FAILURE);
            log.info("Demo login for user (" + username + ") failed: wrong username/password.");
            return;
        }
        setStatus(AuthenticationStatus.SUCCESS);
        setUser(new SimpleUser(username));
        log.info("Demo login for user (" + username + ") succeeded.");
    }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

                    PasswordCredential password = (PasswordCredential) credentials.getCredential();
                    String hashedPassword = securityUtil.hash(u, password.getValue());
                    if (hashedPassword.equals(u.getPassword())) {
                        loginEvent.fire(u);
                        u.setDateLastLogin(new Date());
                        setUser(new SimpleUser(u.getContact().getEmailAddress()));
                        setStatus(AuthenticationStatus.SUCCESS);
                        eventLog.fire(new EventLog(u, "User Logged In"));
                    } else {
                        messages.info("Incorrect Password");
                        setStatus(AuthenticationStatus.FAILURE);
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

        conversation.begin();
        this.username = username;

        roles = new ArrayList<Role>();

        Collection<RoleType> roleTypes = identitySession.getRoleManager().findUserRoleTypes(new SimpleUser(username));

        for (RoleType roleType : roleTypes) {
            roles.addAll(identitySession.getRoleManager().findRoles(username, roleType.getName()));
        }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

    }

    public
    @Transactional
    void deleteUser(String username) throws IdentityException {
        identitySession.getPersistenceManager().removeUser(new SimpleUser(username), true);
    }
View Full Code Here

Examples of org.picketlink.idm.model.SimpleUser

     *
     * @param aeroGearUser
     */
    @Override
    public void create(AeroGearUser aeroGearUser) {
        User picketLinkUser = new SimpleUser(aeroGearUser.getUsername());
        picketLinkUser.setEmail(aeroGearUser.getEmail());
        picketLinkUser.setFirstName(aeroGearUser.getFirstName());
        picketLinkUser.setLastName(aeroGearUser.getLastName());
        identityManager.add(picketLinkUser);
        /*
         * Disclaimer: PlainTextPassword will encode passwords in SHA-512 with SecureRandom-1024 salt
         * See http://lists.jboss.org/pipermail/security-dev/2013-January/000650.html for more information
         */
 
View Full Code Here

Examples of org.picketlink.idm.model.SimpleUser

     */
    //TODO this entire initialization code will be removed
    @PostConstruct
    public void create() {

        User user = new SimpleUser("john");

        user.setEmail("john@doe.com");
        user.setFirstName("John");
        user.setLastName("Doe");

        /*
         * Note: Password will be encoded in SHA-512 with SecureRandom-1024 salt
         * See http://lists.jboss.org/pipermail/security-dev/2013-January/000650.html for more information
         */
 
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.