Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Identify end user from bearer token

  1. #11
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    Fine if that works, but you should consider TokenStore to be an internal detail of the implementation of DefaultTokenServices (and not use it directly if possible). If you like decoding the token twice (once in the authentication filter and once in the controller) you can inject a ResourceServerTokenServices into your controller, and that would be preferable. Personally, I would prefer to use the Principal (it should be an instance of OAuth2Authentication if the correct filter is in place).

  2. #12
    Join Date
    May 2013
    Posts
    7

    Default

    Quote Originally Posted by Dave Syer View Post
    I would prefer to use the Principal (it should be an instance of OAuth2Authentication if the correct filter is in place).
    Interested with the above suggestion. I am fairly new to Spring, but let me try that.

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •