asp.net - Return user roles from bearer token of Web API -
i developing web api 2 project. authentication using bearer token. on successful authentication api returns json object. {"access_token":"vn2kwvz...", "token_type":"bearer", "expires_in":1209599, "username":"username", ".issued":"sat, 07 jun 2014 10:43:05 gmt", ".expires":"sat, 21 jun 2014 10:43:05 gmt"} now want return user roles in json object. changes need make in order user roles json response? after searching lot found can create custom properties , can set them authentication ticket. in way can customize response can have custom values may required @ caller end. here code send user roles along token. requirement. 1 can modify code send required data. public override async task grantresourceownercredentials(oauthgrantresourceownercredentialscontext context) { using (usermanager<applicationuser> usermanager = _usermanage...