Package org.uberfire.security.auth

Examples of org.uberfire.security.auth.AuthenticationException


        try {
            final Subject subject = authManager.authenticate( httpContext );
            httpContext.setCurrentSubject( subject );
            return subject;
        } catch ( Exception ex ) {
            throw new AuthenticationException( "Validation fails.", ex );
        }
    }
View Full Code Here


                for ( final AuthenticationProvider authProvider : authProviders ) {
                    final AuthenticationResult result = authProvider.authenticate( credential, context );
                    if ( result.getStatus().equals( FAILED ) ) {
                        authScheme.challengeClient( httpContext );
                        throw new AuthenticationException( "Invalid credentials." );
                    } else if ( result.getStatus().equals( SUCCESS ) ) {
                        principal = result.getPrincipal();
                        break all_auth;
                    }
                }
            }
        }

        if ( principal == null ) {
            throw new AuthenticationException( "Invalid credentials." );
        }

        final List<Role> roles = new ArrayList<Role>();
        if ( isRememberOp ) {
            roles.add( new RoleImpl( ROLE_REMEMBER_ME ) );
View Full Code Here

        try {
          httpSecurityContext.getResponse().setStatus(401);
            rd.forward(httpSecurityContext.getRequest(), httpSecurityContext.getResponse());
        } catch (Exception e) {
            throw new AuthenticationException(e);
        }
    }
View Full Code Here

        final Principal principal;

        final Credential credential = scheme.buildCredential( userPassContext );

        if ( credential == null ) {
            throw new AuthenticationException( "Invalid credentials." );
        }

        final AuthenticationResult authResult = authProvider.authenticate( credential, context );

        if ( authResult.getStatus().equals( SUCCESS ) ) {
            principal = authResult.getPrincipal();
        } else {
            principal = null;
        }

        if ( principal == null ) {
            throw new AuthenticationException( "Invalid credentials." );
        }

        final List<Role> roles = new ArrayList<Role>();

        if ( roleProvider != null ) {
View Full Code Here

TOP

Related Classes of org.uberfire.security.auth.AuthenticationException

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.