How Token Interceptor work in Struts 2

后端 未结 1 737
有刺的猬
有刺的猬 2021-01-17 01:35

Struts2 provide Token Interceptor for ensures that only one request per token is processed, But, I don\'t understand how it works, if a user send the one request twice what

相关标签:
1条回答
  • 2021-01-17 02:03

    The token interceptor returns the result invalid.token when an invalid token is found. The logic is simple: it uses a session to save a valid token per request and when intercept it checks it by comparing one that sent and other that is from session.

    0 讨论(0)
提交回复
热议问题