|
|
@@ -1,6 +1,5 @@ |
|
|
|
package com.tuoheng.config; |
|
|
|
|
|
|
|
import com.tuoheng.handler.AuthenticationEntryPoint; |
|
|
|
import com.tuoheng.oauth2.authentication.OAuth2ResourceOwnerPasswordAuthenticationConverter; |
|
|
|
import com.tuoheng.handler.AccessDeniedHandler; |
|
|
|
import com.tuoheng.mapper.UserMapper; |
|
|
@@ -100,7 +99,7 @@ public class SecurityConfig { |
|
|
|
.and() |
|
|
|
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt) |
|
|
|
.exceptionHandling(exceptions -> exceptions |
|
|
|
.authenticationEntryPoint(new AuthenticationEntryPoint()) |
|
|
|
.authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/toLogin")) |
|
|
|
.accessDeniedHandler(new AccessDeniedHandler())) |
|
|
|
//.authenticationEntryPoint(new AuthenticationEntryPoint())) |
|
|
|
.apply(authorizationServerConfigurer); |