Package org.atomojo.auth.service.db

Examples of org.atomojo.auth.service.db.User.checkPassword()


               User user = AuthResource.findUser(UserGuard.this.db,identifier);
               if (user==null) {
                  getContext().getLogger().info("No such user.");
                  return Verifier.RESULT_INVALID;
               }
               if (secret!=null && user.checkPassword(new String(secret))) {
                  getContext().getLogger().info("Authentication succeeded, checking permissions");
                  if (permission!=null) {
                     if (!user.hasPermission(permission)) {
                        getContext().getLogger().info("User does not have permission "+permission.getName()+","+permission.getUUID());
                        return Verifier.RESULT_INVALID;
View Full Code Here


                        }
                     }
                  }
                  // lookup for admin
                  User adminUser = AuthResource.findUser(RealmUserGuard.this.db, identifier);
                  if (adminUser != null && adminUser.hasPermission(RealmUserGuard.this.adminPermission) && adminUser.checkPassword(new String(secret))) {
                     // we have an admin user so shortcut and return 1
                     request.getAttributes().put(AuthApplication.USER_ATTR, adminUser);
                     return Verifier.RESULT_VALID;
                  }
               } catch (SQLException ex) {
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.