-
Sep 2nd, 2011, 08:56 AM
#1
Implementing token based auth for RESTful service API
Hello
I would like to create the following API:
/api-login - logins user and returns token
/api/{token}/add - add user's item
Am I able to define 2 different Spring Security configurations - main security config and API security config? The problem is that after login Spring Security gets login information from session. This is correct for main security area but not for API
-
Nov 1st, 2011, 05:22 AM
#2
you could implement a spring security filter at position "PRE_AUTH_FILTER" that checks if the token is present in a http-header. (eg. in J_SESSIONID). this way the browsers understands it too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules