Last post Feb 27, 2017 07:46 AM by Khuram.Shahzad
Feb 24, 2017 05:18 AM|GeeKWolF|LINK
I have created bearer token based authentication using Identity and OWIN framework. It successfully authenticated the user. But now I want to get the User Name of the Authenticated user. My project has two modules, WEB API and WEB APP. So, after successfully
authenticated the user, I want to get the person user name etc from the api to app. I tried
User.Identity.Name & HttpContext.Current.User.Identity.Name, but all generate only Null value. So can somebody explain me the way I can get the authenticated user Details ?
Feb 27, 2017 05:29 AM|Eric Du|LINK
According to your description, as far as I know, when you implement authenticate, you could save user name value in session in Web API, then when you call API, return the session value.
About how to store and get session value, please refer to the following links:
Store Session Value:
Get Session Value:
Feb 27, 2017 07:46 AM|Khuram.Shahzad|LINK
When you use Identity Server and other Identity Model to have a token base authentication approach then you can put any data in claims, just create a new claims put use claim => Identity Profile Claim and that is all , In the application you can get claims
list and you can find information what ever was passed.
In Identity Server there Scopes=>Claims a scope can be a container which allow set of claims.