Examples of DisabledException


Examples of org.beangle.security.auth.DisabledException

  public void check(UserDetail user) {
    if (user.isAccountLocked()) { throw new LockedException(textResource.getText(
        "AbstractUserDetailsAuthenticationProvider.locked", "User account is locked"), user); }

    if (!user.isEnabled()) { throw new DisabledException(textResource.getText(
        "AbstractUserDetailsAuthenticationProvider.disabled", "User is disabled"), user); }

    if (user.isAccountExpired()) { throw new AccountExpiredException(textResource.getText(
        "AbstractUserDetailsAuthenticationProvider.expired", "User account has expired"), user); }
View Full Code Here

Examples of org.nimbustools.messaging.gt4_0_elastic.DisabledException

    protected CreateKeyPairResponseType newKey(String ownerID, String keyName)
            throws KeyGenException, IOException, DisabledException {

        if (this.pubkeyOnly) {
            throw new DisabledException("SSH key generation is disabled");
        }

        final JSch jsch=new JSch();
        final KeyPair kpair;
        try {
View Full Code Here

Examples of org.nimbustools.messaging.gt4_0_elastic.DisabledException

     * @return token, never null
     * @throws DisabledException related behavior disabled
     */
    public String getSplitToken() throws DisabledException {
        if (!this.pubkeyOnly) {
            throw new DisabledException("pubkey-only behavior disabled");
        }
        return this.splitToken;
    }
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

        } else {
            user = userDAO.find(username);

            if (user != null && user.isSuspended() != null) {
                if (user.isSuspended()) {
                    throw new DisabledException("User " + user.getUsername() + " is suspended");
                }
                authenticated = authenticate(
                        authentication.getCredentials().toString(),
                        user.getCipherAlgorithm(),
                        user.getPassword());
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

           
        }
       
        // Returned user is never null
        if ( !user.isEnabled() ) {
            throw new DisabledException("Username: " + user.getUsername());
        }
       
        if ( !user.isAccountNonLocked() ) {
            throw new LockedException("Username: " + user.getUsername());
        }
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

        } else {
            user = userDAO.find(username);

            if (user != null) {
                if (user.getSuspended()) {
                    throw new DisabledException("User " + user.getUsername() + " is suspended");
                }

                passwordUser.setPassword(authentication.getCredentials().toString(), user.getCipherAlgoritm(), 0);
                authenticated = user.getPassword().equalsIgnoreCase(passwordUser.getPassword());
            }
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

            }

            if (!user.isEnabled()) {
                logger.debug("User account is disabled");

                throw new DisabledException(messages.getMessage("AbstractUserDetailsAuthenticationProvider.disabled",
                        "User is disabled"), user);
            }

            if (!user.isAccountNonExpired()) {
                logger.debug("User account is expired");
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

        MockHttpServletResponse response = new MockHttpServletResponse();

        //ep.afterPropertiesSet();

        String msg = "These are the jokes kid";
        ep.commence(request, response, new DisabledException(msg));

        assertEquals(401, response.getStatus());
        assertEquals(msg, response.getErrorMessage());

        assertEquals("Basic realm=\"hello\"", response.getHeader("WWW-Authenticate"));
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

            // User not in registry. Needs to register
            user = new GaeUser(googleUser.getUserId(), googleUser.getNickname(), googleUser.getEmail());
        }

        if (!user.isEnabled()) {
            throw new DisabledException("Account is disabled");
        }

        return new GaeUserAuthentication(user, authentication.getDetails());
    }
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

        MockHttpServletResponse response = new MockHttpServletResponse();

        ep.afterPropertiesSet();

        ep.commence(request, response, new DisabledException("foobar"));

        // Check response is properly formed
        assertEquals(401, response.getStatus());
        assertEquals(true, response.getHeader("WWW-Authenticate").toString().startsWith("Digest "));
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.