oauth2 Token and point and basic auth combination

please help me. i need to config for login endpoint is public, it actual public until i need to config basic auth for a specific api, when i config basic auth login api always show login alert form

[![enter image description here][1]][1]
here my config :

@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class ResourceServerConfiguration extends WebSecurityConfigurerAdapter {

    @Value("${spring.profiles.active:default}")
    private String activeProfile;

    @Value("${ekyc.username}")
    private String username;

    @Value("${ekyc.password}")
    private String password;

    private final CustomAuthenticationEntryPoint customAuthenticationEntryPoint;

    private final JwtTokenAuthenticationFilter jwtTokenAuthenticationFilter;

    public ResourceServerConfiguration(CustomAuthenticationEntryPoint customAuthenticationEntryPoint,
                                       JwtTokenAuthenticationFilter jwtTokenAuthenticationFilter, BasicAuthConfiguration basicAuthConfiguration) {
        this.customAuthenticationEntryPoint = customAuthenticationEntryPoint;
        this.jwtTokenAuthenticationFilter = jwtTokenAuthenticationFilter;
    }

    private static final String[] ENDPOINT_PUBLIC =  {
            EXTERNAL_MB_SESSION_VERIFY,
            EXTERNAL_MB_CALLBACK_TRANSACTION,
            EXTERNAL_MB_PAYGATE_CALLBACK_TRANSACTION,
            URL_FORGOT_PASSWORD,
            "/api/users/token",
            "/actuator/health",
            URL_RESET_PASSWORD_CONFIRM,
            URL_RESET_PASSWORD_REQUEST,
            URL_HEALTH_TWELVE_QUESTION,
            "/oauth/token"
            // Some public end-point...


    };

    @Override
    public void configure(HttpSecurity http) throws Exception {
        http
                .headers(headers -> headers.frameOptions(FrameOptionsConfig::sameOrigin))
                .csrf().disable()
                .addFilterBefore(jwtTokenAuthenticationFilter, UsernamePasswordAuthenticationFilter.class)
                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
                .and()
                .authorizeRequests()
                .antMatchers(ENDPOINT_PUBLIC).permitAll()
                .anyRequest()
                .authenticated()
                .and()
                .exceptionHandling()
                .authenticationEntryPoint(customAuthenticationEntryPoint)
                .accessDeniedHandler(new CustomAccessDeniedHandler());
    }

    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }

    @Bean
    @Override
    public AuthenticationManager authenticationManagerBean() throws Exception {
        return super.authenticationManagerBean();
    }

    @Override
    public void configure(WebSecurity web) {
        if (Objects.equals(activeProfile, "stg") || Objects.equals(activeProfile, "dev")) {
            web.ignoring().antMatchers("/v3/api-docs/**", "/swagger-ui/**");
        }
    }

i am login by TokenEnpoint like that :

public class OAuthTokenEndpoint extends TokenEndpoint {
    private final UserSessionService userSessionService;


    

    @Operation(summary = "postAccessToken -> Sử dụng hàm POST để login cho User")
    @PostMapping
    public ResponseEntity<OAuth2AccessToken> postAccessToken(Principal principal,
                                                             @RequestParam Map<String, String> parameters,
                                                             HttpServletRequest request) throws HttpRequestMethodNotSupportedException {
        ResponseEntity<OAuth2AccessToken> oAuth2AccessToken = super.postAccessToken(principal, parameters);
        
        if ("password".equals(parameters.get(GRANT_TYPE))) { 
            Map<String, Object> additionalInfo = Objects.requireNonNull(oAuth2AccessToken.getBody()).getAdditionalInformation();
            RemoteClientDto clientInfo = CommonUtils.getClientInfo(request);

            userSessionService.createUserSession(
                    Long.valueOf(additionalInfo.get(CLAIM_KEY_USER_ID).toString()),
                    (String) additionalInfo.get(CLAIM_USER_SESSION_ID),
                    clientInfo
            );
        }

        return oAuth2AccessToken;
    }

now i need to create an API which is secured by basic auth, how can i do it
i have tried config

@Order(2)
// Đảm bảo rằng cấu hình này được áp dụng trước cấu hình ResourceServerConfiguration
public class BasicAuthConfiguration extends WebSecurityConfigurerAdapter {

    @Value("${ekyc.username}")
    private String username;

    @Value("${ekyc.password}")
    private String password;

    @Override
    protected void configure(HttpSecurity http) throws Exception {

        // @formatter:off
        http.anonymous().disable()
                .requestMatcher(request -> {
                    String auth = request.getHeader(HttpHeaders.AUTHORIZATION);
                    return (auth != null && auth.startsWith("Basic"));
                })
                .antMatcher(EXTERNAL_MBAL_SUBMIT_EKYC)
                .authorizeRequests().anyRequest().authenticated()
                .and()
                .httpBasic();
        // @formatter:on
    }


    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }

        @Override
    public void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication().withUser(username).password(passwordEncoder().encode(password)).roles("MBAL");
    }
} ```
but it have not been working
pleas, help me


  [1]: https://i.sstatic.net/Lh7GzvAd.png

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật