簡體   English   中英

如何使用samel 2令牌通過WEB API 2016 CRM服務進行身份驗證

[英]How to use samel 2 token to authenticate with WEB API 2016 CRM service

我已經通過遵守ws-trust規范成功獲得了安全令牌(samel2.0)。 我無法繼續如何使用此令牌訪問我的服務(CRM 2016 web api)?

這是我得到的令牌:

<encryptedassertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<xenc:encrypteddata xmlns:xenc="http://www.w3.org/2001/04/xmle..." type="http://www.w3.org/2001/04/xmle...">
<xenc:encryptionmethod algorithm="http://www.w3.org/2001/04/xmle..."/>
<keyinfo xmlns="http://www.w3.org/2000/09/xmld...">
<e:encryptedkey xmlns:e="http://www.w3.org/2001/04/xmle...">
<e:encryptionmethod algorithm="http://www.w3.org/2001/04/xmle...">
<digestmethod algorithm="http://www.w3.org/2000/09/xmld..."/>
</e:encryptionmethod>
<keyinfo>
<ds:x509data xmlns:ds="http://www.w3.org/2000/09/xmld...">
<ds:x509issuerserial>
<ds:x509issuername>CN=*.crm.maxtrain.com</ds:x509issuername>
<ds:x509serialnumber>...</ds:x509serialnumber>
</ds:x509issuerserial>
</ds:x509data>
</keyinfo>
<e:cipherdata>
<e:ciphervalue>...</e:ciphervalue>
</e:cipherdata>
</e:encryptedkey>
</keyinfo>
<xenc:cipherdata>
<xenc:ciphervalue>...</xenc:ciphervalue>
</xenc:cipherdata>
</xenc:encrypteddata>
</encryptedassertion>

任何幫助將不勝感激。

對我來說,我只是將令牌添加為帶有HTTP頭消息的Bearer令牌,如格式Authorization: Bearer <xml token> 因此,根據http請求,您必須包含該標頭。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM