Package org.springframework.security.authentication.event

Examples of org.springframework.security.authentication.event.AuthenticationSuccessEvent


                AuthenticationFailureProxyUntrustedEvent.class);
    }

    public void publishAuthenticationSuccess(Authentication authentication) {
        if (applicationEventPublisher != null) {
            applicationEventPublisher.publishEvent(new AuthenticationSuccessEvent(authentication));
        }
    }
View Full Code Here


    @Test
    public void targetDoesntLoseApplicationListenerInterface() {
        assertEquals(1, appContext.getBeansOfType(ApplicationListener.class).size());
        assertEquals(1, appContext.getBeanNamesForType(ApplicationListener.class).length);
        appContext.publishEvent(new AuthenticationSuccessEvent(new TestingAuthenticationToken("user", "")));

        assertTrue(target instanceof ApplicationListener<?>);
    }
View Full Code Here

        super.setUp();
    }

    public void testAbstractAuthenticationEvent() {
        Authentication auth = getAuthentication();
        AbstractAuthenticationEvent event = new AuthenticationSuccessEvent(auth);
        assertEquals(auth, event.getAuthentication());
    }
View Full Code Here

                AuthenticationFailureProxyUntrustedEvent.class.getName());
    }

    public void publishAuthenticationSuccess(Authentication authentication) {
        if (applicationEventPublisher != null) {
            applicationEventPublisher.publishEvent(new AuthenticationSuccessEvent(authentication));
        }
    }
View Full Code Here

    this.listener.setApplicationEventPublisher(this.publisher);
  }

  @Test
  public void testAuthenticationSuccess() {
    this.listener.onApplicationEvent(new AuthenticationSuccessEvent(
        new UsernamePasswordAuthenticationToken("user", "password")));
    verify(this.publisher).publishEvent((ApplicationEvent) anyObject());
  }
View Full Code Here

TOP

Related Classes of org.springframework.security.authentication.event.AuthenticationSuccessEvent

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.