1
我想集成令牌證書和通過ADFS來的SAML對象。由於KeyInfo格式,我可以解析[使用C#]每個項目,除了認證的值。我認爲「KeyInfo」缺少'ds'前綴。我不知道我在做什麼錯誤。ADFS SAML前綴ds丟失在<KeyInfo>
<samlp:Response ID=\"_00ca83c9-aad0-4210-9174-87ec874c5103\" Version=\"2.0\" xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\">
<Issuer xmlns=\"urn:oasis:names:tc:SAML:2.0:assertion\">*******</Issuer><samlp:Status><samlp:StatusCode Value=\"urn:oasis:names:tc:SAML:2.0:status:Success\" /></samlp:Status>
<Assertion ID=\"_bac09d77-c98e-48f6-bf62-8bbbbd1756d9\" IssueInstant=\"2015-08-19T23:07:32.659Z\" Version=\"2.0\" xmlns=\"urn:oasis:names:tc:SAML:2.0:assertion\"><Issuer>http://ADFS.*******.com.au/adfs/services/tru</Issuer>
<ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">
<ds:SignedInfo></ds:SignedInfo>
<ds:SignatureValue>some value</ds:SignatureValue>
<KeyInfo xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><ds:X509Data><ds:X509Certificate>some value</ds:X509Certificate></ds:X509Data></KeyInfo>
</ds:Signature>
<Attribute Name=\"LastName\"><AttributeValue>FFFF</AttributeValue></Attribute>
<Attribute Name=\"Username\"><AttributeValue>fdfdgf</AttributeValue></Attribute>
<Attribute Name=\"VAL6\"><AttributeValue>AAAAA</AttributeValue></Attribute>
<AuthnStatement AuthnInstant=\"2015-08-19T23:07:32.549Z\"><AuthnContext>
<AuthnContextClassRef>urn:federation:authentication:windows</AuthnContextClassRef></AuthnContext></AuthnStatement>
</Assertion>
</samlp:Response>
謝謝你的答覆,但我想在SAML對象。我是否需要編寫任何代碼[在C#中工作]或者在ADFS服務器上需要任何配置? –
Zubair
您應該可以將ds添加到打開和關閉標記中。我從網頁複製了KeyInfo,並忘記手動添加ds。 – jdweng