Package org.springframework.security.authentication

Examples of org.springframework.security.authentication.ProviderManager.authenticate()


        ProviderManager pm = (ProviderManager) appContext.getBeansOfType(ProviderManager.class).values().toArray()[0];
        Object eventPublisher = FieldUtils.getFieldValue(pm, "eventPublisher");
        assertNotNull(eventPublisher);
        assertTrue(eventPublisher instanceof DefaultAuthenticationEventPublisher);

        pm.authenticate(new UsernamePasswordAuthenticationToken("bob", "bobspassword"));
        assertEquals(1, listener.events.size());
    }

    @Test
    public void credentialsAreClearedByDefault() throws Exception {
View Full Code Here


//                    logger.debug("Previously Authenticated: " + authentication);
//                }
//                return authentication;
            }else{
              ProviderManager authenticationManager = (ProviderManager)StorageService.ctx.getBean("customAuthenticationManager");
              authentication = authenticationManager.authenticate(authentication);

                // We don't authenticated.setAuthentication(true), because each provider should do that
//                if (logger.isDebugEnabled()) {
//                    logger.debug("Successfully Authenticated: " + authentication);
//                }
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.