red
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
I recommend using a cookie if the token is not needed on the client side.
19 replies
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
Consider storing in a Cookie, or sessionStorage
19 replies
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
If you just store the token in the header and send it to the client, it will only be valid for a single request.
19 replies
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
Where are you storing the token?
19 replies
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
About session control and management with spring security, just an article by baeldung: https://www.baeldung.com/spring-security-session
19 replies
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
Try to use "if required" instead of stateless or remove formlogin if you want to use JWT authentication
19 replies
JCHJava Community | Help. Code. Learn.
•Created by Danix on 1/18/2025 in #java-help
Jwt Auth Issue
The problem is that you are using formlogin but your session strategy is stateless, and the use of formlogin depends on enabling sessions
19 replies
JCHJava Community | Help. Code. Learn.
•Created by IamMax420 on 1/16/2025 in #java-help
stripe dependency not being recognized?
Ooh nice
41 replies
JCHJava Community | Help. Code. Learn.
•Created by IamMax420 on 1/16/2025 in #java-help
stripe dependency not being recognized?
Could you send me your pom.xml?
41 replies
JCHJava Community | Help. Code. Learn.
•Created by IamMax420 on 1/16/2025 in #java-help
stripe dependency not being recognized?
So maybe the IDE didn't download the dependencies from maven central or something like that
41 replies
JCHJava Community | Help. Code. Learn.
•Created by IamMax420 on 1/16/2025 in #java-help
stripe dependency not being recognized?
This question may seem silly, but are you sure that all the dependency data is correct?
41 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
But maybe this might not be a problem in your case
24 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
The problem with this approach that I mentioned is that it is not possible for the same route to be accessed by more than one form of authentication. For more flexibility, you also should create a filter that processes the user credentials, creates an Authentication object and then based on the obtained data, delegate the authentication to an AuthenticationProvider
24 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
Yes, indeed. But you can get around this by creating two SecurityFilterChain and specifying which authenticationProvider to use.
24 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
Name the beans and then use @Qualifier to specify which authenticationProvider you want to inject
24 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
Or something like that
24 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
I think that this way you can separate the two forms of login and still delegate the management of beans to Spring Security as it should be.
24 replies
JCHJava Community | Help. Code. Learn.
•Created by Tomasm21 on 1/16/2025 in #java-help
How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()
Try to create two AuthenticationProvider, one for each UserDetailsService and then register both of them with @Bean
24 replies
JCHJava Community | Help. Code. Learn.
•Created by red on 1/16/2025 in #java-help
Help me with spring JDBC
It works well, thanks
56 replies
JCHJava Community | Help. Code. Learn.
•Created by red on 1/16/2025 in #java-help
Help me with spring JDBC
Oh I think I got it
56 replies