瀏覽代碼

处理异常信息

tags/v2.3.0
chenjiandong 1 年之前
父節點
當前提交
ab8d828594
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. +1
    -2
      tuoheng_oidc_server/src/main/java/com/tuoheng/config/SecurityConfig.java

+ 1
- 2
tuoheng_oidc_server/src/main/java/com/tuoheng/config/SecurityConfig.java 查看文件

@@ -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);

Loading…
取消
儲存