how to get spring security session from zk controller ?

asked 2014-05-17 15:38:33 +0800

saadbouna gravatar image saadbouna

I am using spring security with ZK framework what i want to do is to have custom authentication ,in other word is to create a session that contain an id when authentication is succeeded and remove it when the user logout.so i wonder how to get this session from a ZK controller ?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-12-07 10:58:34 +0800

Darksu gravatar image Darksu
1991 1 4

Hello saadbouna,

Please refer to the following url's in order to get started with your task:




Best Regards,


link publish delete flag offensive edit

answered 2014-12-07 11:33:24 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16

updated 2014-12-07 11:38:04 +0800

This is all done by the spring-security self!

If it's well configurated the spring-security uses the users session that comes from the browser. The authentication is cleared immediatelly if you log out correctly.


Otherwise it's cleared if the session is time out.

you can get at any place in the applications code the authentication object with this:

Authentication auth = SecurityContextHolder.getContext().getAuthentication();

best Stephan

PS: Have a look on ZKBoost. it's all in there.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-05-17 15:38:33 +0800

Seen: 57 times

Last updated: Dec 07 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More