@Bean DigestAuthenticationFilter digestFilter(DigestAuthenticationEntryPoint digestAuthenticationEntryPoint, UserCache digestUserCache, UserDetailsService userDetailsService) { DigestAuthenticationFilter filter = new DigestAuthenticationFilter(); filter.setAuthenticationEntryPoint(digestAuthenticationEntryPoint); filter.setUserDetailsService(userDetailsService); filter.setUserCache(digestUserCache); return filter; }
@Bean public DigestAuthenticationEntryPoint digestEntryPoint () { //DigestAuthenticationEntryPoint digestAuthenticationEntryPoint = new DigestAuthenticationEntryPoint(); DigestAuthenticationEntryPoint digestAuthenticationEntryPoint = new CustomDigestAuthenticationEntryPoint(); digestAuthenticationEntryPoint.setKey(env.getProperty("digest.key")); digestAuthenticationEntryPoint.setRealmName(env.getProperty("digest.realm")); digestAuthenticationEntryPoint.setNonceValiditySeconds(3); return digestAuthenticationEntryPoint; }
@Bean public DigestAuthenticationEntryPoint digestEntryPoint() { DigestAuthenticationEntryPoint entryPoint = new DigestAuthenticationEntryPoint(); entryPoint.setRealmName("CIMS API"); entryPoint.setKey("cims-dig-it"); entryPoint.setNonceValiditySeconds(10); return entryPoint; }
@Bean public DigestAuthenticationFilter digestAuthFilter(DigestAuthenticationEntryPoint entryPoint, UserDetailsService userDetailsService) { DigestAuthenticationFilter filter = new DigestAuthenticationFilter(); filter.setUserDetailsService(userDetailsService); filter.setAuthenticationEntryPoint(entryPoint); return filter; }