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

Security-session only looks for old config #261

Closed
jameskleeh opened this issue May 29, 2020 · 1 comment
Closed

Security-session only looks for old config #261

jameskleeh opened this issue May 29, 2020 · 1 comment
Assignees

Comments

@jameskleeh
Copy link
Contributor

@Configuration
@Requires(property = SecuritySessionConfigurationProperties.PREFIX + ".enabled", notEquals = StringUtils.FALSE)
package io.micronaut.security.session;

If someone moves to the new config and sets authentication = cookie, with security-session on the classpath, session related beans will still override

@sdelamo sdelamo self-assigned this May 29, 2020
@sdelamo
Copy link
Contributor

sdelamo commented May 29, 2020

Not sure if I am understand.

If you have both security-jwt and security-session.

If you have micronaut.micronaut.authentication: cookie'.

SecuritySessionLoginHandler will not be loaded because the class will be annotated with @Requires(property = SecurityConfigurationProperties.PREFIX + ".authentication", value = "session")

Please, not that for authentication: cookie to work you need security-jwt module.

The @Configuration you mention will disable every session bean if you want that.

@jameskleeh jameskleeh assigned jameskleeh and unassigned sdelamo May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants