Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The branch is 6.2.x, but the dependency is 6.1.1 #180

Closed
Vijay-Lee opened this issue Jan 5, 2024 · 3 comments
Closed

The branch is 6.2.x, but the dependency is 6.1.1 #180

Vijay-Lee opened this issue Jan 5, 2024 · 3 comments
Assignees

Comments

@Vijay-Lee
Copy link

The branch is 6.2.x, but the dependency is 6.1.1。
the address is spring/security-samples/servlet/spring-boot/java/jwt/login/gradle.properties。
The dependency version I introduced was spring-security:6.2.0,I then wrote the JWT certification based on the example,but org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer#jwt()
Has been marked as deprecated。Here's my code
@Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { // @formatter:off http .authorizeHttpRequests((authorize) -> authorize .anyRequest().authenticated() ) .csrf((csrf) -> csrf.ignoringRequestMatchers("/token")) .httpBasic(Customizer.withDefaults()) .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt) .sessionManagement((session) -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .exceptionHandling((exceptions) -> exceptions .authenticationEntryPoint(new BearerTokenAuthenticationEntryPoint()) .accessDeniedHandler(new BearerTokenAccessDeniedHandler()) ); // @formatter:on return http.build(); }

@marcusdacoregio
Copy link
Contributor

Hi, @Vijay-Lee. I'm not sure if I understood what the problem is. Is it that the version does not match the branch of is it something related to the deprecation?

@marcusdacoregio marcusdacoregio self-assigned this Jan 5, 2024
@Vijay-Lee
Copy link
Author

Vijay-Lee commented Jan 8, 2024

Dear @marcusdacoregio ,thanks for your reply!
My problem is that the version does not match the branch.
I would like to see how JWT certification is implemented, based on version 6.2.0,but I can't find an example.

@marcusdacoregio
Copy link
Contributor

This sample is using Spring Security 6.2.0 via Spring Boot 3.2.0, you can check the versions here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants