Spring adds a JSESSIONID despite stateless session management

前端 未结 2 1051
野趣味
野趣味 2021-01-12 02:20

I am using a working JWT authentication of my web application with the following configuration:

@Override
protected void configure(HttpSecurity http) throws          


        
2条回答
  •  一整个雨季
    2021-01-12 02:55

    Your current configuration (sessionCreationPolicy(SessionCreationPolicy.STATELESS)) ensures that Spring-Security (and only Spring-Security)

    • won't create the session
    • won't rely on the session for providing authentication details (for example, providing the Principal).

    Any other component of your application (for example, if you would use Spring-Session) is still free to create the session.

提交回复
热议问题