Home > Back-end >  Spring security oauth2 through filling SecurityContext access_token, request has been 403
Spring security oauth2 through filling SecurityContext access_token, request has been 403

Time:12-24

Authorization code mode and password mode, simple mode, client mode of these works, but set the token in the request header to identify the user, has been showed the Access is denied, the user is anonymous), after the screen as if because no execution ` OAuth2ClientAuthenticationProcessingFilter ` this filter, but the don't know why, hope leaders help

CodePudding user response:

The log information:
 
11:28:29 2020-12-23. 9924-739 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern='/request/token]
The 2020-12-23 11:28:29. 9924-739 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Checking the match of the request: '/user/1'. Against '/request/token'
11:28:29 2020-12-23. 9924-739 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern='/request/token_key]
The 2020-12-23 11:28:29. 9924-739 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Checking the match of the request: '/user/1'. Against '/request/token_key'
11:28:29 2020-12-23. 9924-739 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern='/request/check_token]
The 2020-12-23 11:28:29. 9924-739 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Checking the match of the request: '/user/1'. Against '/request/check_token'
The 11:28:29 2020-12-23. 9924-740 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: No matches found
The 11:28:29 2020-12-23. 9924-740 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 at position 1 of 13 in additional filter chain; Firing Filter: 'WebAsyncManagerIntegrationFilter'
11:28:29 2020-12-23. 9924-740 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 at position 2 of 13 additional in the filter chain. Firing Filter: 'SecurityContextPersistenceFilter'
The 2020-12-23 11:28:29. 9924-740 the DEBUG [IO - 30000 - exec - 5] W.C.H ttpSessionSecurityContextRepository: No HttpSession currently exists
The 2020-12-23 11:28:29. 9924-740 the DEBUG [IO - 30000 - exec - 5] W.C.H ttpSessionSecurityContextRepository: No SecurityContext was available from the HttpSession: null. A new one will be created.
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 at position 3 of 13 additional in the filter chain. Firing Filter: 'HeaderWriterFilter'
The 11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 at position 4 of 13 in additional filter chain; Firing Filter: 'LogoutFilter'
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern="/logout", GET]
The 2020-12-23 11:28:29. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Checking the match of the request: '/user/1'. Against '/logout'
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern='/logout, POST]
The 2020-12-23 11:28:29. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Request 'GET/user/1' doesn 't match' POST/logout '
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern="/logout", PUT]
The 2020-12-23 11:28:29. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Request 'GET/user/1' doesn 't match' PUT/logout '
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: Trying to match the using Ant [pattern="/logout", DELETE]
The 2020-12-23 11:28:29. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Request 'GET/user/1' doesn 't match' DELETE/logout '
The 11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W eb. Util. Matcher. OrRequestMatcher: No matches found
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 at position 5 of 13 additional in the filter chain. Firing Filter: 'UsernamePasswordAuthenticationFilter'
The 2020-12-23 11:28:29. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Request 'GET/user/1' doesn 't match' POST/login '
11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 6 at the position of 13 in additional filter chain; Firing Filter: 'DefaultLoginPageGeneratingFilter'
The 11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 7 at the position of 13 in additional filter chain; Firing Filter: 'DefaultLogoutPageGeneratingFilter'
The 2020-12-23 11:28:29. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S.W.U.M atcher. AntPathRequestMatcher: Checking the match of the request: '/user/1'. Against '/logout'
The 11:28:29 2020-12-23. 9924-742 the DEBUG [IO - 30000 - exec - 5] O.S.S ecurity. Web. Named FilterChainProxy:/user/1 8 at the position of 13 in additional filter chain; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related