Package org.springframework.security.userdetails.memory

Examples of org.springframework.security.userdetails.memory.UserAttribute


    if(ua == null) {
      throw new Error("The init parameter 'userAttribute' must be declared");
    }
    final UserAttributeEditor uae = new UserAttributeEditor();
    uae.setAsText(ua);
    final UserAttribute userAttribute = (UserAttribute) uae.getValue();
    wrapped.setUserAttribute(userAttribute);
  }
View Full Code Here


      // Convert value to a password, enabled setting, and list of granted
      // authorities
      configAttribEd.setAsText( value );

      UserAttribute attr = (UserAttribute) configAttribEd.getValue();

      // Make a user object, assuming the properties were properly
      // provided
      if ( attr != null ) {
        UserDetails user =
            new User( username, attr.getPassword(), attr.isEnabled(), true, true, true, attr.getAuthorities() );
        userMap.addUser( user );
      }
    }

    return userMap;
View Full Code Here

            // flag
            String username = (String) iter.next();
            configAttribEd.setAsText(props.getProperty(username));

            // if the parsing succeeded turn that into a user object
            UserAttribute attr = (UserAttribute) configAttribEd.getValue();
            if (attr != null) {
                User user = createUserObject(username, attr.getPassword(), attr.isEnabled(), attr.getAuthorities());
                users.put(username, user);
            }
        }

        return users;
View Full Code Here

  Iterator it = prop.keySet().iterator();
  while  (it.hasNext()){
    String username = (String)it.next();
    uae.setAsText(prop.getProperty(username));
    UserAttribute attrs = (UserAttribute) uae.getValue();
    if (attrs != null) {
      myDetailStorage.put(username, makeUser(username, attrs));
    }
  }
      }
View Full Code Here

TOP

Related Classes of org.springframework.security.userdetails.memory.UserAttribute

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.