Examples of LockedAccountException


Examples of org.apache.shiro.authc.LockedAccountException

            } catch (UnknownAccountException uae) {
                throw new UnknownAccountException("Authentication Failed. There is no user with username of " + token.getPrincipal(), uae.getCause());
            } catch (IncorrectCredentialsException ice) {
                throw new IncorrectCredentialsException("Authentication Failed. Password for account " + token.getPrincipal() + " was incorrect!", ice.getCause());
            } catch (LockedAccountException lae) {
                throw new LockedAccountException("Authentication Failed. The account for username " + token.getPrincipal() + " is locked."
                    + "Please contact your administrator to unlock it.", lae.getCause());
            } catch (AuthenticationException ae) {
                throw new AuthenticationException("Authentication Failed.", ae.getCause());
            }
        }
View Full Code Here

Examples of org.apache.shiro.authc.LockedAccountException

    String username = principalCollection.getPrimaryPrincipal().toString();
    User user = dao().fetch(User.class, Cnd.where("name", "=", username));
        if (user == null)
            return null;
        if (user.isLocked())
            throw new LockedAccountException("Account [" + username + "] is locked.");
       
        SimpleAuthorizationInfo auth = new SimpleAuthorizationInfo();
        auth.setRoles(user.getRoleStrSet());
        auth.addStringPermissions(user.getPermissionStrSet());
       
View Full Code Here

Examples of org.apache.shiro.authc.LockedAccountException

    UsernamePasswordToken upToken = (UsernamePasswordToken) token;
    User user = dao().fetch(User.class, Cnd.where("name", "=", upToken.getUsername()));
        if (user == null)
            return null;
        if (user.isLocked())
            throw new LockedAccountException("Account [" + upToken.getUsername() + "] is locked.");
        dao().fetchLinks(user, null);
        SimpleAccount account = new SimpleAccount(upToken.getUsername(), user.getPasswd(), name);
        if (user.getSalt() != null)
            account.setCredentialsSalt(ByteSource.Util.bytes(user.getSalt()));
        return account;
View Full Code Here

Examples of org.apache.shiro.authc.LockedAccountException

            } catch (UnknownAccountException uae) {
                throw new UnknownAccountException("Authentication Failed. There is no user with username of " + token.getPrincipal(), uae.getCause());
            } catch (IncorrectCredentialsException ice) {
                throw new IncorrectCredentialsException("Authentication Failed. Password for account " + token.getPrincipal() + " was incorrect!", ice.getCause());
            } catch (LockedAccountException lae) {
                throw new LockedAccountException("Authentication Failed. The account for username " + token.getPrincipal() + " is locked."
                        + "Please contact your administrator to unlock it.", lae.getCause());
            } catch (AuthenticationException ae) {
                throw new AuthenticationException("Authentication Failed.", ae.getCause());
            }
        }
View Full Code Here

Examples of org.apache.shiro.authc.LockedAccountException

            } catch (UnknownAccountException uae) {
                throw new UnknownAccountException("Authentication Failed. There is no user with username of " + token.getPrincipal(), uae.getCause());
            } catch (IncorrectCredentialsException ice) {
                throw new IncorrectCredentialsException("Authentication Failed. Password for account " + token.getPrincipal() + " was incorrect!", ice.getCause());
            } catch (LockedAccountException lae) {
                throw new LockedAccountException("Authentication Failed. The account for username " + token.getPrincipal() + " is locked."
                    + "Please contact your administrator to unlock it.", lae.getCause());
            } catch (AuthenticationException ae) {
                throw new AuthenticationException("Authentication Failed.", ae.getCause());
            }
        }
View Full Code Here

Examples of org.cfcc.LockedAccountException

                    // Older records could have a blank question, so use the default
                    if (question.equals("")) {
                        question = Environment.security_questions[0];
                    } else {
                        if (question.equals("LOCKED")) {
                            throw new LockedAccountException();
                        }
                    }
                    int which = 0;
                    for (int i = 0; i < Environment.security_questions.length; i++) {
                      if (Environment.security_questions[i].equals(question)) {
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.