0

Implement Spring security

asked 2010-10-20 07:03:13 +0800

christabhi gravatar image christabhi
99 1

updated 2010-10-20 07:06:13 +0800

Hi I am new for this zk,
I want to implement the spring security in my application, I read the document provided to implement the Spring security but
I am not be able to replicate it into my application.

I want to authenticate my application using DB call, how may i configure the "authentication-provider" to do the same.

There is role define the flow of the apps(like admin/user), how may i configure the spring security to set the flow and sent the request to the specified view-state as per the role.

Thanks
christabhi

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-10-20 15:00:11 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-10-20 15:00:24 +0800

A help could be the docu and the source codes of the Zksample2 demo application

link publish delete flag offensive edit

answered 2010-10-21 00:37:39 +0800

abhishekv5 gravatar image abhishekv5
54 2

Hi Terry,

I am implementing this Spring security 1st time so I have few queries.

1) I have to manage the flow like when User login in it will go to different page and if Admin login it will go to different page, it all depends on Role
earlier for this i have created a session and put user object in it, which i get from the database. And used this session in the entire page.

2) How do I implement the same, using Spring security on Role base.

And I want to know about my approach, which one is good, 1st or 2nd one.

Thanks if you comment on my approach as well, it really helps me to be a good developer.

Thanks
Abhishek

link publish delete flag offensive edit

answered 2010-10-21 01:02:33 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi christabhi,
You may need to implement UserDetailsService. You can refer to this

link publish delete flag offensive edit

answered 2010-10-21 01:10:55 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi abhishekv5,
Welcome to ZK Forum.
have you read this article if you are going to use spring security then i would suggest going with option 2 as it will save you from lot of boiler plate code dealing with managing your custom user object in session. Hope that helps.

link publish delete flag offensive edit

answered 2010-10-21 02:16:28 +0800

abhishekv5 gravatar image abhishekv5
54 2

Hi Ashish,

This article is really very effective, but I want to use authentication in webflow, I want to redirect my page in webflow according to Role.

Thanks if you provide me such kind of example.

Thanks
Abhishek

link publish delete flag offensive edit

answered 2010-10-21 21:41:11 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi abhishekv5,
Not sure but check if this helps.

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2010-10-20 07:03:13 +0800

Seen: 302 times

Last updated: Oct 21 '10

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