Spring security always returns HTTP 403

前端 未结 7 2084
逝去的感伤
逝去的感伤 2020-12-28 17:07

I have configured a custom Filter that grants a spring authority for every URL other than /login :

public class TokenFilter impleme         


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-28 17:55

    Getting a 403 instead of a 401 usually means that you were logged in but you are not permitted (via authority) to see a resource.

    Debug and confirm that the user you are logging in has that authority (I know your code sets it, but maybe you are setting something else wrong).

提交回复
热议问题