Examples of afterPropertiesSet()


Examples of org.springframework.security.authentication.dao.SystemWideSaltSource.afterPropertiesSet()

    public void testDetectsMissingSystemWideSalt() throws Exception {
        SystemWideSaltSource saltSource = new SystemWideSaltSource();

        try {
            saltSource.afterPropertiesSet();
            fail("Should have thrown IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            assertEquals("A systemWideSalt must be set", expected.getMessage());
        }
    }
View Full Code Here

Examples of org.springframework.security.cas.ServiceProperties.afterPropertiesSet()

    //~ Methods ========================================================================================================

    @Test(expected=IllegalArgumentException.class)
    public void detectsMissingService() throws Exception {
        ServiceProperties sp = new ServiceProperties();
        sp.afterPropertiesSet();
    }

    @Test
    public void nullServiceWhenAuthenticateAllTokens() throws Exception {
        ServiceProperties sp = new ServiceProperties();
View Full Code Here

Examples of org.springframework.security.cas.authentication.EhCacheBasedTicketCache.afterPropertiesSet()

    @Test
    public void testCacheOperation() throws Exception {
        EhCacheBasedTicketCache cache = new EhCacheBasedTicketCache();
        cache.setCache(cacheManager.getCache("castickets"));
        cache.afterPropertiesSet();

        final CasAuthenticationToken token = getToken();

        // Check it gets stored in the cache
        cache.putTicketInCache(token);
View Full Code Here

Examples of org.springframework.security.cas.web.CasAuthenticationEntryPoint.afterPropertiesSet()

    public void testDetectsMissingLoginFormUrl() throws Exception {
        CasAuthenticationEntryPoint ep = new CasAuthenticationEntryPoint();
        ep.setServiceProperties(new ServiceProperties());

        try {
            ep.afterPropertiesSet();
            fail("Should have thrown IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            assertEquals("loginUrl must be specified", expected.getMessage());
        }
    }
View Full Code Here

Examples of org.springframework.security.core.authority.mapping.SimpleAuthorityMapper.afterPropertiesSet()

        LdapAuthenticationProvider ldapAuthenticationProvider = new LdapAuthenticationProvider(
                ldapAuthenticator, authoritiesPopulator);
        SimpleAuthorityMapper simpleAuthorityMapper = new SimpleAuthorityMapper();
        simpleAuthorityMapper.setPrefix(rolePrefix);
        simpleAuthorityMapper.afterPropertiesSet();
        ldapAuthenticationProvider.setAuthoritiesMapper(simpleAuthorityMapper);
        if(userDetailsContextMapper != null) {
            ldapAuthenticationProvider.setUserDetailsContextMapper(userDetailsContextMapper);
        }
        return ldapAuthenticationProvider;
View Full Code Here

Examples of org.springframework.security.core.token.KeyBasedPersistenceTokenService.afterPropertiesSet()

        service.setServerSecret("MY:SECRET$$$#");
        service.setServerInteger(Integer.valueOf(454545));
        try {
            SecureRandom rnd = (SecureRandom) fb.getObject();
            service.setSecureRandom(rnd);
            service.afterPropertiesSet();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return service;
    }
View Full Code Here

Examples of org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache.afterPropertiesSet()

    @Test
    public void cacheOperationsAreSuccessful() throws Exception {
        EhCacheBasedUserCache cache = new EhCacheBasedUserCache();
        cache.setCache(getCache());
        cache.afterPropertiesSet();

        // Check it gets stored in the cache
        cache.putUserInCache(getUser());
        assertEquals(getUser().getPassword(), cache.getUserFromCache(getUser().getUsername()).getPassword());
View Full Code Here

Examples of org.springframework.security.ldap.DefaultSpringSecurityContextSource.afterPropertiesSet()

        springSecurityContextSource.setUserDn(ldapServerProperties.get().getManagerDn());
        springSecurityContextSource.setPassword(ldapServerProperties.get().getManagerPassword());
      }

      try {
        springSecurityContextSource.afterPropertiesSet();
      } catch (Exception e) {
        log.error("LDAP Context Source not loaded ", e);
        throw new UsernameNotFoundException("LDAP Context Source not loaded", e);
      }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer.afterPropertiesSet()

    /**
     * Main class to allow server to be started from gradle script
     */
    public static void main(String[] args) throws Exception {
        ApacheDSContainer server = new ApacheDSContainer("dc=springframework,dc=org", "classpath:test-server.ldif");
        server.afterPropertiesSet();
    }

    public static int getServerPort() {
        if(serverPort == null) {
            throw new IllegalStateException("The ApacheDSContainer is not currently running");
View Full Code Here

Examples of org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter.afterPropertiesSet()

      .and()
        .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
      // @formatter:on
      ClientCredentialsTokenEndpointFilter filter = new ClientCredentialsTokenEndpointFilter();
      filter.setAuthenticationManager(super.authenticationManagerBean());
      filter.afterPropertiesSet();
      http.addFilterBefore(filter, BasicAuthenticationFilter.class);
    }

    @Bean
    protected AccessDeniedHandler accessDeniedHandler() {
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.