Skip to content

Replace deprecated check() with authorize() in AuthorizationManager#3874

Closed
gdgenchev wants to merge 1 commit intocloudfoundry:developfrom
gdgenchev:migrate-check-to-authorize
Closed

Replace deprecated check() with authorize() in AuthorizationManager#3874
gdgenchev wants to merge 1 commit intocloudfoundry:developfrom
gdgenchev:migrate-check-to-authorize

Conversation

@gdgenchev
Copy link
Copy Markdown
Contributor

AuthorizationManager.check() was deprecated in Spring Security 6.5.x in favor of authorize() and later got removed in Spring Security 7.x.

Spring Security 6.4+ deprecated check() in favor of authorize()
- Update AuthorizationManagersUtils to use authorize()
- Update SelfCheckAuthorizationManager to use authorize()
- Update all test usages to call authorize()
- Keep deprecated check() methods for backwards compatibility with Spring Security 6
- authorize() returns AuthorizationResult (check() returns AuthorizationDecision subtype)

Works on both Spring Boot 3 (Spring Security 6) and Spring Boot 4 (Spring Security 7)
@gdgenchev
Copy link
Copy Markdown
Contributor Author

Closing this, as it will anyway need migration in boot 4 - we have overridden the check in a few places and they cannot be removed pre-boot-4.

@gdgenchev gdgenchev closed this Apr 24, 2026
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

Successfully merging this pull request may close these issues.

1 participant