0

I have some problems with authorization. I don't want to use Spring Security, just simple authorization form (with two fields: UserName, Password and submit button). Then user can work with application data (data representation depends on UserName). But I don't know, how to save UserName of authorized user for any further manipulations (in session scope. for example to show only authorized user data).

Also I want to protect application in a such way: if user somehow knew about addresses of my pages (e.g. /addRataPage, /deleteDataPage, and so on...), but tries to go there without authorization, he should be redirected to some page (for example, again to the authorization page).

Could you help me?

asked Nov 25, 2010 at 11:29
2
  • why dont you want to use Spring Security ? it does exactly what you are asking ... Commented Nov 25, 2010 at 12:10
  • Looks like the term "authorization" here is misleading. The process here is authentication(login) not authorization. Authorization has more to it such as role based access to various resources etc. Commented Feb 5, 2013 at 22:03

1 Answer 1

1

Why not use Spring Security? It looks like it would solve your problems perfectly, as it would manage the authorisation for you, keep the username in scope, and allow only authorised users to access protected URLs. What's your objection to using it?

answered Nov 25, 2010 at 12:10
Sign up to request clarification or add additional context in comments.

5 Comments

I have two HSQLDB tables: owners, things.
Why would that stop you using Spring Security?
Owners loks like this: ID, Name. And I want to join owners and system users, so that when user enters to the system, he can manipulate only with his things (things.id_user). I don't want to make another table (users) and connect it with owners table
You can customize Spring Security to use your own table 'OWNERS'. Dont need to create another table
Thanks to all! I found how to join Useres and Owners tables.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.