spring-projects / spring-projects/spring-security

Wrong class referenced in Spring Security documentation

Open Beginner friendly
#15,541 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Expected Behavior
I have found one inconsistency in the spring security documentation.
More specifically on this page https://docs.spring.io/spring-security/reference/servlet/authorization/method-security.html
under the section "Each Annotation Has Its Own Method Interceptor", there is listing of Method security annotations and there corresponding Interceptors. However, in my opinion, for the @PostAuthorize annotation, the interceptor is incorrect and instead of:
AuthorizationManagerBeforeMethodInterceptor#postAuthorize, there should be:
AuthorizationManagerAfterMethodInterceptor#postAuthorize

Current Behavior
Currently for @PostAuthorize annotation, interceptor class is documented as AuthorizationManagerBeforeMethodInterceptor.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked method-security documentation page and find the section "Each Annotation Has Its Own Method Interceptor." Check the interceptor listed for @PostAuthorize against the referenced AuthorizationManagerBeforeMethodInterceptor and AuthorizationManagerAfterMethodInterceptor classes; done means the page names the correct interceptor and the documentation build or link checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
documentation, security
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.