Results 1 to 2 of 2

Thread: Implementing token based auth for RESTful service API

  1. #1
    Join Date
    Jan 2011
    Posts
    11

    Default 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

  2. #2
    Join Date
    Jul 2009
    Posts
    15

    Default

    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
  •