Grails isn't responding with a 401 during ajax request and timed out session

后端 未结 2 2132
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 12:46

I\'m using grails along with spring security and angularjs. When a user session has expired and the user clicks an ajax action on the page, rather than respond with a 401, t

2条回答
  •  盖世英雄少女心
    2020-12-22 13:01

    Did you consider "locking a screen" when the user is idle on a client-side? Of course you should handle end of a session on server-side but in fact it seems even cleaner and more secure solution than waiting for an action from client side (especially if user has left and left on a screen some sensitive data).

    Check out this ng-idle directive.

提交回复
热议问题