Skip to content

Commit

Permalink
feat: 支持从微信登录
Browse files Browse the repository at this point in the history
  • Loading branch information
lichong-a committed Oct 13, 2024
1 parent 341db0e commit 11a5883
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http,
.loginPage(defaultLoginPage)
.loginProcessingUrl("/api/v1/auth/login")
.successHandler(customAuthenticationSuccessHandler)
.failureHandler(customAuthenticationFailureHandler))
.failureHandler(customAuthenticationFailureHandler)
.permitAll())
.logout(logout -> logout
.logoutUrl("/api/v1/auth/logout")
.addLogoutHandler(clearSiteData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class WechatAuthenticationFilter extends AbstractAuthenticationProcessing
/**
* 微信登录路径
*/
public static final String WECHAT_LOGIN_PATH = "/wechat/login";
public static final String WECHAT_LOGIN_PATH = "/api/v1/auth/wechat/login";
/**
* 允许的请求方法
*/
Expand Down
2 changes: 1 addition & 1 deletion starter/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ application:
# 注销成功跳转地址,默认为"/login?logout"
logout-success-url:
# 登录页地址,默认:/login
login-page: /pages/login/wechat/index
login-page: /api/v1/auth/unauthorized
token:
# 签名密钥
signing-key: portalserver8fas8hage9SHVfsd847GD8475fd8880ejf
Expand Down

0 comments on commit 11a5883

Please sign in to comment.