Package org.jboss.aerogear.security.exception

Examples of org.jboss.aerogear.security.exception.AeroGearSecurityException


        credentialMatcher.validate(user, currentPassword);

        if (credentialMatcher.hasExpired() || credentialMatcher.isValid()) {
            this.identityManager.updateCredential(user, new Password(newPassword));
        } else {
            throw new AeroGearSecurityException(HttpStatus.PASSWORD_RESET_FAILED);
        }
    }
View Full Code Here


        credentials.setCredential(new Password(password));

        credentialMatcher.validate(user, password);

        if (credentialMatcher.hasExpired()) {
            throw new AeroGearSecurityException(HttpStatus.CREDENTIAL_HAS_EXPIRED);
        } else if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

        return true;
    }
View Full Code Here

    }

    //TODO figure out a best place to put this method
    private void onAuthenticationFailure() {
        if (!identity.isLoggedIn())
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
    }
View Full Code Here

        credentials.setUserId(user.getLoginName());
        credentials.setCredential(new Password(password));

        if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

        return true;
    }
View Full Code Here

    }

    //TODO figure out a best place to put this method
    private void onAuthenticationFailure() {
        if (!identity.isLoggedIn())
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
    }
View Full Code Here

        credentials.setUserId(aeroGearUser.getUsername());
        credentials.setCredential(new Password(aeroGearUser.getPassword()));


        if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

        return false;
    }
View Full Code Here

    }

    //TODO figure out a best place to put this method
    private void onAuthenticationFailure() {
        if (!identity.isLoggedIn())
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
    }
View Full Code Here

     */
    @Override
    public void isRouteAllowed(Route route) throws ServletException {

        if (!credential.hasRoles(route.getRoles())) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

    }
View Full Code Here

        credentials.setUserId(user.getLoginName());
        credentials.setCredential(new Password(password));

        if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

        return false;
    }
View Full Code Here

    }

    //TODO figure out a best place to put this method
    private void onAuthenticationFailure() {
        if (!identity.isLoggedIn())
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
    }
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.security.exception.AeroGearSecurityException

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.