简体   繁体   中英

Identity Server Partial Login and get the Email Claim

I have a partial login before navigating to a different page before full login occurs. Is there a way to obtain claims within the partial login intermediary page? For example, the email claim.

Within my controller, I can obtain the partial login with the following code:

HttpContext.Current.GetOwinContext().Environment.GetIdentityServerPartialLoginAsync()

Unfortunately, the Claims property on the returned object is always empty until a full login has been completed.

Yes, when you issue the partial login, there's an overload on the AuthenticateResult ctor where you can pass claims. These will be available in the partial login page via GetIdentityServerPartialLoginAsync .

So it turns out claims aren't present for a partial login. I was able to obtain them from a UserService when composing an AuthenticateResult for Partial Logins.

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