I am using Spring (Web MVC - REST) 4.3.3, spring security 3.2.4, Spring security Oauth 1.0.0 and OAuth2 for Authorization.
I am storing user's id as principle of authentication object.
My Question is, I want to know which user called the web service in the Service layer. How can I get that?
I want to use it like this,
Suppose someone creates an user. The creator will be stored in the new user. One way is to pass creator in the user object from client but I want that to be got from token itself because it already has that information.
EDIT
A brief explanation of downvote is welcomed.