简体   繁体   中英

aspnet core RC2 When does the User (claimsprincipal) get initialized

In the controller classes you have access to the User, which is just a claimsprincipal. (see below)

在此处输入图片说明

At what point does this get initialized? And how, by what method? Could I do this manually?

The reason I ask is because I want to be able to get the user upon logging in, but because they have not yet logged in the User is null. But I want to be able to access the users claims in the login action.

在此处输入图片说明

I figured it out thanks anyways guys. 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM