Package org.apache.turbine.om.security

Examples of org.apache.turbine.om.security.User


     * @throws UnknownEntityException if the object could not be instantiated.
     */
    public User getUserInstance(String userName)
            throws UnknownEntityException
    {
        User user = getUserInstance();
        user.setName(userName);
        return user;
    }
View Full Code Here


     *         could not be determined, or does not exist.
     */
    public User getAnonymousUser()
            throws UnknownEntityException
    {
        User user = getUserInstance();
        user.setName("");
        return user;
    }
View Full Code Here

            // Pre-allocate a list which won't need expansion more
            // than once.
            users = new ArrayList((int) (activeSessions.size() * 0.7));
            for (Iterator i = activeSessions.values().iterator(); i.hasNext();)
            {
                User u = getUserFromSession((HttpSession) i.next());
                if (u != null && u.hasLoggedIn())
                {
                    users.add(u);
                }
            }
        }
View Full Code Here

        synchronized (activeSessions)
        {
            for (Iterator i = activeSessions.values().iterator(); i.hasNext();)
            {
                HttpSession session = (HttpSession) i.next();
                User u = this.getUserFromSession(session);
                if (user.equals(u))
                {
                    sessions.add(session);
                }
            }
View Full Code Here

            throws TurbineException
    {
        Object obj = null;

        // Authenticate the user and get the object.
        User user = null;
        user = TurbineSecurity.getAuthenticatedUser(username, password);

        if (user != null)
        {
            if (method.equals("send"))
View Full Code Here

        }

        try
        {
            // Authenticate the user and get the object.
            User user = TurbineSecurity.getAuthenticatedUser(
                    username, password);

            // Store the user object.
            data.setUser(user);

            // Mark the user as being logged in.
            user.setHasLoggedIn(Boolean.TRUE);

            // Set the last_login date in the database.
            user.updateLastLogin();

            // This only happens if the user is valid; otherwise, we
            // will get a valueBound in the User object when we don't
            // want to because the username is not set yet.  Save the
            // User object into the session.
View Full Code Here

     *            service.
     */
    public void doPerform(RunData data)
            throws TurbineSecurityException
    {
        User user = data.getUser();

        if (!TurbineSecurity.isAnonymousUser(user))
        {
            // Make sure that the user has really logged in...
            if (!user.hasLoggedIn())
            {
                return;
            }

            user.setHasLoggedIn(Boolean.FALSE);
            TurbineSecurity.saveUser(user);
        }

        Configuration conf = Turbine.getConfiguration();

View Full Code Here

     * @exception TurbineSecurityException problem with the security service.
     */
    public void doPerform(RunData data)
            throws TurbineSecurityException
    {
        User user = data.getUser();

        if (!TurbineSecurity.isAnonymousUser(user)
            && user.hasLoggedIn())
        {
            log.debug("Fetching ACL for " + user.getName());
            AccessControlList acl = (AccessControlList)
                    data.getSession().getAttribute(
                            AccessControlList.SESSION_KEY);
            if (acl == null)
            {
View Full Code Here

     */
    public User retrieve(String userName, String password)
            throws PasswordMismatchException, UnknownEntityException,
            DataBackendException
    {
        User user = retrieve(userName);
        authenticate(user, password);
        return user;
    }
View Full Code Here

     */
    public User retrieve(String userName, String password)
        throws PasswordMismatchException, UnknownEntityException,
               DataBackendException
    {
        User user = retrieve(userName);
        authenticate(user, password);
        return user;
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.om.security.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.