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

Error when spring security is disabled #389

Closed
jdaugherty opened this issue Aug 30, 2018 · 1 comment
Closed

Error when spring security is disabled #389

jdaugherty opened this issue Aug 30, 2018 · 1 comment
Labels
Milestone

Comments

@jdaugherty
Copy link

In SpringSecurityRestGrailsPlugin.groovy, doWithSpring is designed to not register beans if Spring Security is disabled (see below), but doWithApplicationContext is missing similar logic. This causes errors fetching the tokenGenerator bean when spring security or rest are disabled.

       def conf = SpringSecurityUtils.securityConfig
        if (!conf || !conf.active) {
            return
        }

        SpringSecurityUtils.loadSecondaryConfig 'DefaultRestSecurityConfig'
        conf = SpringSecurityUtils.securityConfig

        if (!conf.rest.active) {
            return
        }
@Tobbe129
Copy link

This one is very important for us, is there a workaround?

@alvarosanchez alvarosanchez added this to the 2.0.0 milestone Feb 12, 2020
alvarosanchez added a commit that referenced this issue Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants