Kentor AuthService - Read Subject NameID

旧时模样 提交于 2020-01-24 19:40:13

问题


How can I access to saml2:NameID from saml2:Subject response XML node by using Kentor AuthService?

I couldn't find in code anything that deals with that part of XML. Maybe I'm missing something.

I'm not asking about Kentor IdP, I see that there NameID is sent as additional claim, which is translated as attribute, I'm asking in general, IdP does not have to be powered by Kentor, so I can't rely that I will have this value passed as attribute.

So, if it's handled I couldn't find it here: https://github.com/KentorIT/authservices/tree/master/Kentor.AuthServices

One option can be to parse XML on my own, but if there's already implemented or better solution that will be great.


回答1:


The Subject NameID is translated to a claim with type ClaimTypes.NameIdentifier (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier).

It should be in the claims collection of the created claims identity.



来源:https://stackoverflow.com/questions/29216083/kentor-authservice-read-subject-nameid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!