开发者

j2ee single login from just one ip address

I am using Glassfish V3 with filerealm. How do I ensure each username can only be login into one machine at any one time.

I thought of using a hashmap datastore to store the remote address, but then it would 开发者_如何转开发means I would need to change all the struts actions to check if the user has already login and is not from another ip address.

How is it being done ? this is only single machine, how do I scale it up to a cluster of Glassfish?


No, this is what aspect oriented programming was born for. Security is a cross-cutting concern.

For web apps, you can think of a servlet Filter as before-method aspect. Put the check for client IP address in a filter and re-route if it doesn't match your required value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜