Package org.springframework.security.web.authentication.www

Examples of org.springframework.security.web.authentication.www.DigestAuthenticationFilter


    Environment env;

    // @see http://docs.spring.io/spring-security/site/docs/4.0.0.CI-SNAPSHOT/reference/htmlsingle/#digest-processing-filter
    @Bean
    DigestAuthenticationFilter digestAuthenticationFilter() throws Exception {
        DigestAuthenticationFilter digestAuthenticationFilter = new DigestAuthenticationFilter();
        digestAuthenticationFilter.setAuthenticationEntryPoint(digestEntryPoint());
        digestAuthenticationFilter.setUserDetailsService(userDetailsServiceBean());
        return digestAuthenticationFilter;
    }
View Full Code Here


        request = new MockHttpServletRequest();

        entryPoint = new DigestAuthenticationEntryPoint();
        entryPoint.setKey("key");
        entryPoint.setRealmName("Spring Security");
        filter = new DigestAuthenticationFilter();
        filter.setUserDetailsService(new UserDetailsService() {
            public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
                return new User(username,password, AuthorityUtils.createAuthorityList("ROLE_USER"));
            }
        });
View Full Code Here

            aep.afterPropertiesSet();
        } catch (Exception e) {
            throw new IOException(e);
        }
       
        DigestAuthenticationFilter filter = new DigestAuthenticationFilter();

        filter.setCreateAuthenticatedToken(true);
        filter.setPasswordAlreadyEncoded(true);
       

        filter.setAuthenticationEntryPoint(aep);
       
       
        HttpDigestUserDetailsServiceWrapper wrapper =
                new HttpDigestUserDetailsServiceWrapper(
                        getSecurityManager().loadUserGroupService(authConfig.getUserGroupServiceName()),
                        Charset.defaultCharset());
        filter.setUserDetailsService(wrapper);
       
        filter.afterPropertiesSet();
        getNestedFilters().add(filter);       
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.web.authentication.www.DigestAuthenticationFilter

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.