spring oauth2 授权失败,百搜索不得其解,求助大神,异常如下

剑禅觅心 发布于 2018/03/31 19:16
阅读 1K+
收藏 0
19:08:54.276 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Secure object: FilterInvocation: URL: /oauth/token; Attributes: [anonymous]
19:08:54.276 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@9055e4a6: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS
19:08:54.286 logback [http-nio-10004-exec-1] DEBUG o.s.s.access.vote.AffirmativeBased - Voter: org.springframework.security.web.access.expression.WebExpressionVoter@3ef5f8c, returned: 1
19:08:54.286 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - Authorization successful
19:08:54.286 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.a.i.FilterSecurityInterceptor - RunAsManager did not change Authentication object
19:08:54.286 logback [http-nio-10004-exec-1] DEBUG o.s.security.web.FilterChainProxy - /oauth/token reached end of additional filter chain; proceeding with original chain
19:08:54.305 logback [http-nio-10004-exec-1] DEBUG o.s.s.o.p.e.FrameworkEndpointHandlerMapping - Looking up handler method for path /oauth/token
19:08:54.308 logback [http-nio-10004-exec-1] DEBUG o.s.s.o.p.e.FrameworkEndpointHandlerMapping - Returning handler method [public org.springframework.http.ResponseEntity<org.springframework.security.oauth2.common.OAuth2AccessToken> org.springframework.security.oauth2.provider.endpoint.TokenEndpoint.postAccessToken(java.security.Principal,java.util.Map<java.lang.String, java.lang.String>) throws org.springframework.web.HttpRequestMethodNotSupportedException]
19:08:54.353 logback [http-nio-10004-exec-1] INFO  o.s.s.o.p.endpoint.TokenEndpoint - Handling error: InsufficientAuthenticationException, There is no client authentication. Try adding an appropriate authentication filter.
19:08:54.481 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.h.writers.HstsHeaderWriter - Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@e4ec085
19:08:54.481 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
19:08:54.490 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.a.ExceptionTranslationFilter - Chain processed normally
19:08:54.490 logback [http-nio-10004-exec-1] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed

 

加载中
0
Storm-Cai
Storm-Cai

跟进源码去看, oauth2源码不难读懂。这个是获取token出的错,看情况似乎是读数据库反序列化成token出错了。

0
哎码
哎码
HttpRequestMethodNotSupportedException
0
吴茨仁
吴茨仁

如何解决的啊

返回顶部
顶部