Examples of AuthorizationFailureEvent


Examples of org.acegisecurity.event.authorization.AuthorizationFailureEvent

      try {
        returnedObject = afterInvocationManager.decide(token.getAuthentication(), token.getSecureObject(),
            token.getAttr(), returnedObject);
      }
      catch (AccessDeniedException accessDeniedException) {
        AuthorizationFailureEvent event = new AuthorizationFailureEvent(token.getSecureObject(), token
            .getAttr(), token.getAuthentication(), accessDeniedException);
        publishEvent(event);

        throw accessDeniedException;
      }
View Full Code Here

Examples of org.acegisecurity.event.authorization.AuthorizationFailureEvent

    // Attempt authorization
    try {
      this.accessDecisionManager.decide(authenticated, object, attr);
    }
    catch (AccessDeniedException accessDeniedException) {
      AuthorizationFailureEvent event = new AuthorizationFailureEvent(object, attr, authenticated,
          accessDeniedException);
      publishEvent(event);

      throw accessDeniedException;
    }
View Full Code Here

Examples of org.acegisecurity.event.authorization.AuthorizationFailureEvent

            // Attempt authorization
            try {
                this.accessDecisionManager.decide(authenticated, object,
                    attr);
            } catch (AccessDeniedException accessDeniedException) {
                AuthorizationFailureEvent event = new AuthorizationFailureEvent(object,
                        attr, authenticated, accessDeniedException);
                this.eventPublisher.publishEvent(event);

                throw accessDeniedException;
            }
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

        // Attempt authorization
        try {
            this.accessDecisionManager.decide(authenticated, object, attributes);
        }
        catch (AccessDeniedException accessDeniedException) {
            publishEvent(new AuthorizationFailureEvent(object, attributes, authenticated, accessDeniedException));

            throw accessDeniedException;
        }

        if (debug) {
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

                returnedObject = afterInvocationManager.decide(token.getSecurityContext().getAuthentication(),
                        token.getSecureObject(),
                        token.getAttributes(), returnedObject);
            }
            catch (AccessDeniedException accessDeniedException) {
                AuthorizationFailureEvent event = new AuthorizationFailureEvent(token.getSecureObject(), token
                        .getAttributes(), token.getSecurityContext().getAuthentication(), accessDeniedException);
                publishEvent(event);

                throw accessDeniedException;
            }
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

    private List<ConfigAttribute> attributes = SecurityConfig.createList("TEST");
    private AccessDeniedException exception = new AuthorizationServiceException("error", new Throwable());

    @Test(expected=IllegalArgumentException.class)
    public void rejectsNullSecureObject() {
        new AuthorizationFailureEvent(null, attributes, foo, exception);
    }
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

        new AuthorizationFailureEvent(null, attributes, foo, exception);
    }

    @Test(expected=IllegalArgumentException.class)
    public void rejectsNullAttributesList() {
        new AuthorizationFailureEvent(new SimpleMethodInvocation(), null, foo, exception);
    }
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

        new AuthorizationFailureEvent(new SimpleMethodInvocation(), null, foo, exception);
    }

    @Test(expected=IllegalArgumentException.class)
    public void rejectsNullAuthentication() {
        new AuthorizationFailureEvent(new SimpleMethodInvocation(), attributes, null, exception);
    }
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

        new AuthorizationFailureEvent(new SimpleMethodInvocation(), attributes, null, exception);
    }

    @Test(expected=IllegalArgumentException.class)
    public void rejectsNullException() {
        new AuthorizationFailureEvent(new SimpleMethodInvocation(), attributes, foo, null);
    }
View Full Code Here

Examples of org.springframework.security.access.event.AuthorizationFailureEvent

        new AuthorizationFailureEvent(new SimpleMethodInvocation(), attributes, foo, null);
    }

    @Test
    public void gettersReturnCtorSuppliedData() throws Exception {
        AuthorizationFailureEvent event = new AuthorizationFailureEvent(new Object(), attributes , foo, exception);
        assertSame(attributes, event.getConfigAttributes());
        assertSame(exception, event.getAccessDeniedException());
        assertSame(foo, event.getAuthentication());
    }
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.