asp.net core mvc - Unable to create new claim identity -


i trying expose field authenticated user, i'm having bit of difficulty trying add new claim authenticated user.

in mvc5 similar following:

public class applicationuser : identityuser {     public string fullname { get; set; }     public async task<claimsidentity> generateuseridentityasync(usermanager<applicationuser> manager)     {         // note authenticationtype must match 1 defined in cookieauthenticationoptions.authenticationtype         var useridentity = await manager.createidentityasync(this, defaultauthenticationtypes.applicationcookie);         // add custom user claims here         useridentity.addclaim(new claim("fullname", fullname));         return useridentity;     } } 

when attempt in mvc6 run problems objects , methods missing. createidentityasync() , defaultauthenticationtypes both appear missing or says visual studio , when dig identity source can see createidentityasync no longer there, can't seem find defaultauthenticationtypes.

right @ point think nice have, been driving me nuts past few days , nice understand whats wrong or how has changed.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -