Package org.springframework.security.authentication

Examples of org.springframework.security.authentication.ProviderManager$NullEventPublisher


  @Override
  public Object postProcessAfterInitialization(Object bean, String beanName)
      throws BeansException {
    if(beanName.equals("authenticationManager")) {
      ProviderManager authManager = (ProviderManager) bean;
      if (addIndex < 0) {
        authManager.getProviders().add(providerToAdd);
      } else {
        authManager.getProviders().add(addIndex, providerToAdd );
      }
    }
    return bean;
  }
View Full Code Here


            log.debug(bean);
        }*/

        PasswordEncoder passwordEncoder = null;
        try {
            ProviderManager provider = (ProviderManager) ctx.getBean("org.springframework.security.authenticationManager");
            for (Object o : provider.getProviders()) {
                AuthenticationProvider p = (AuthenticationProvider) o;
                if (p instanceof RememberMeAuthenticationProvider) {
                    config.put("rememberMeEnabled", Boolean.FALSE);
                } else if (ctx.getBean("passwordEncoder") != null) {
                    passwordEncoder = (PasswordEncoder) ctx.getBean("passwordEncoder");
View Full Code Here

    // Make injection of spring beans in wicket-related classes possible using
    // @SpringBean.
    addComponentInstantiationListener(new SpringComponentInjector(this, appctx, true));

    ProviderManager authMan = new ProviderManager();
    List<TestingAuthenticationProvider> providerList =
      new ArrayList<TestingAuthenticationProvider>();
    providerList.add(new TestingAuthenticationProvider());
    authMan.setProviders(providerList);

    // appctx.putBean("testAuthenticationProvider", authProvider);
    // appctx.putBean("authenticationManager", authMan);
    this.authenticationManager = authMan;
View Full Code Here

        AuthorityUtils
            .commaSeparatedStringToAuthorityList("ROLE_USER,ROLE_ADMIN")));
  }

  private UserDetails getUser() {
    ProviderManager parent = (ProviderManager) this.context
        .getBean(AuthenticationManager.class);
    DaoAuthenticationProvider provider = (DaoAuthenticationProvider) parent
        .getProviders().get(0);
    UserDetailsService service = (UserDetailsService) ReflectionTestUtils.getField(
        provider, "userDetailsService");
    UserDetails user = service.loadUserByUsername("user");
    return user;
View Full Code Here

        return this;
    }

    @Override
    protected ProviderManager performBuild() throws Exception {
        ProviderManager providerManager = new ProviderManager(authenticationProviders, parentAuthenticationManager);
        if(eraseCredentials != null) {
            providerManager.setEraseCredentialsAfterAuthentication(eraseCredentials);
        }
        if(eventPublisher != null) {
            providerManager.setAuthenticationEventPublisher(eventPublisher);
        }
        providerManager = postProcess(providerManager);
        return providerManager;
    }
View Full Code Here

    }

    @Bean
    @Autowired
    public AuthenticationManager authenticationManager(AuthenticationProvider authenticationProvider, AuthenticationProvider rememberMeAuthenticationProvider) {
        return new ProviderManager(asList(authenticationProvider, rememberMeAuthenticationProvider));
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.authentication.ProviderManager$NullEventPublisher

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.