Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpringSecurityUserProviderConfiguration errantly triggers during autoconfiguration #173

wgorder opened this issue Jun 29, 2016 · 3 comments


Copy link

wgorder commented Jun 29, 2016

If you have spring-security on the classpath but do not include


Autoconfiguration will fail due to the way that the Conditional Beans are currently set up. In my case I do not wish to use Togglz security at all. Therefore the below block of code should be conditional on something that is brought in with the togglz-spring-security artifact to prevent it from activating otherwise.
I think @ConditionalOnClass({EnableWebSecurity.class, AuthenticationEntryPoint.class, SpringSecurityUserProvider.class}) would do the trick.

    @ConditionalOnClass({EnableWebSecurity.class, AuthenticationEntryPoint.class})
    protected static class SpringSecurityUserProviderConfiguration {

        private TogglzProperties properties;

        public UserProvider userProvider() {
            return new SpringSecurityUserProvider(properties.getConsole().getFeatureAdminAuthority());
Copy link

What error are you getting? Would you be able to post a stacktrace?

Copy link

Yes I think you are right about adding the SpringSecurityUserProvider class to the conditional on class.
I will push a change to master shortly.

marceloverdijk pushed a commit that referenced this issue Jun 30, 2016
Copy link

Change is pushed to master and will be available in latest snapshot. Please watch
Thanks for reporting this @wgorder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants