Skip to content

Commit

Permalink
chore: drop authenticationEntryPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nekolr committed Dec 26, 2023
1 parent 04f900b commit 5669c1e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
5 changes: 0 additions & 5 deletions src/main/java/com/nekolr/saber/config/WebSecurityConfig.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.nekolr.saber.config;

import com.nekolr.saber.security.jwt.JwtAuthenticationEntryPoint;
import com.nekolr.saber.security.jwt.JwtAuthenticationFilter;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
Expand All @@ -20,7 +19,6 @@
public class WebSecurityConfig {

private final JwtAuthenticationFilter jwtAuthenticationFilter;
private final JwtAuthenticationEntryPoint authenticationEntryPoint;

@Bean
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
Expand All @@ -38,9 +36,6 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
// X-XSS-Protection: 1; mode=block
.headers(configurer -> configurer.xssProtection(config -> config.headerValue(XXssProtectionHeaderWriter.HeaderValue.ENABLED_MODE_BLOCK)))

// 授权异常处理
.exceptionHandling(configurer -> configurer.authenticationEntryPoint(authenticationEntryPoint))

// 不需要 session
.sessionManagement(configurer -> configurer.sessionCreationPolicy(SessionCreationPolicy.STATELESS))

Expand Down

This file was deleted.

0 comments on commit 5669c1e

Please sign in to comment.