Examples of UserPrincipal


Examples of org.apache.karaf.jaas.modules.UserPrincipal

            throw new FailedLoginException("Password for " + user + " does not match");
          }
        }

        principals = new HashSet<Principal>();
        principals.add(new UserPrincipal(user));
        for (int i = 1; i < infos.length; i++) {
            principals.add(new RolePrincipal(infos[i]));
        }

        users.clear();
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

     */
    public List<UserPrincipal> listUsers() {
        List<UserPrincipal> result = new ArrayList<UserPrincipal>();

        for (String userNames : users.keySet()) {
            UserPrincipal userPrincipal = new UserPrincipal(userNames);
            result.add(userPrincipal);
        }
        return result;
    }
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

            context.close();
        } catch (Exception e) {
            logger.warn("User " + user + " authentication failed.", e);
            return false;
        }
        principals.add(new UserPrincipal(user));
        // step 3: retrieving user roles
        try {
            logger.debug("Get user roles.");
            DirContext context = new InitialDirContext(env);
            SearchControls controls = new SearchControls();
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

                    throw new LoginException("login failed");
                  } else {
                    throw new LoginException("Password for " + user + " does not match");
                  }
                }
                principals.add(new UserPrincipal(user));
            }

            //Retrieve user roles from database
            roleStatement = connection.prepareStatement(roleQuery);
            roleStatement.setString(1, user);
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

                //Remove from users
                listUserStatement = connection.prepareStatement(selectUsersQuery);
                usersResultSet = listUserStatement.executeQuery();
                while (!usersResultSet.next()) {
                    String username = usersResultSet.getString("USERNAME");
                    users.add(new UserPrincipal(username));
                }
            } catch (SQLException e) {
                logger.error("Error executiong statement", e);
            } finally {
                try {
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

            throw new FailedLoginException("Password for " + user + " does not match");
          }
        }

        principals = new HashSet<Principal>();
        principals.add(new UserPrincipal(user));
        for (int i = 1; i < infos.length; i++) {
            principals.add(new RolePrincipal(infos[i]));
        }

        users.clear();
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

     */
    public List<UserPrincipal> listUsers() {
        List<UserPrincipal> result = new ArrayList<UserPrincipal>();

        for (String userNames : users.keySet()) {
            UserPrincipal userPrincipal = new UserPrincipal(userNames);
            result.add(userPrincipal);
        }
        return result;
    }
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

                throw new FailedLoginException("Password for " + user + " does not match");
              }
            }

            principals = new HashSet<Principal>();
            principals.add(new UserPrincipal(user));
            for (int i = 1; i < infos.length; i++) {
                principals.add(new RolePrincipal(infos[i]));
            }

            return true;
View Full Code Here

Examples of org.apache.karaf.jaas.modules.UserPrincipal

                } catch (Exception e) {
                    // ignore
                }
            }
        }
        principals.add(new UserPrincipal(user));
        // step 3: retrieving user roles
        context = null;
        try {
            logger.debug("Get user roles.");
            context = new InitialDirContext(env);
View Full Code Here

Examples of org.apache.openejb.core.security.jaas.UserPrincipal

        return socketURI;
    }

    @Override
    public Principal getUserPrincipal() {
        return new UserPrincipal("");
    }
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.