title: Using SAML 2.0 to authenticate from .net mvc to another site
body: <p>I've never used SAML before and am a bit confused.  I thought I could just base64 encode xml and a key and be on my way, but apparently its not that simple.</p>
  
  <p>I have to send a SAMLRESPONSE to a post method </p>
  
  <pre><code>&lt;form method="post" action="%ACS" ...&gt;
      &lt;input type="hidden" name="SAMLResponse" value="%RESPONSE" /&gt;
      &lt;input type="hidden" name="RelayState" value="%RELAYSTATE" /&gt;
       ...
  &lt;/form&gt;
  </code></pre>
  
  <p>The action is their URL and the SAMLRESPONSE I generate on my end with the certificare or IDP MEta data and the assertation. I thought I could encode my xml </p>
  
  <pre><code>&lt;samlp:Response xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'ID='identifier_1'Version='2.0'IssueInstant='2004-12-05T09:22:05Z'Destination='https://sp.example.com/SAML2/SSO/POST'&gt; &lt;saml:Issuer&gt;https://idp.example.org/SAML2&lt;/saml:Issuer&gt; &lt;samlp:Status&gt; &lt;samlp:StatusCode Value='urn:oasis:names:tc:SAML:2.0:status:Success'/&gt; &lt;/samlp:Status&gt; &lt;saml:Assertion xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'ID='identifier_2'Version='2.0'IssueInstant='2004-12-05T09:22:05Z'&gt; &lt;saml:Issuer&gt;https://idp.example.org/SAML2&lt;/saml:Issuer&gt; &lt;ds:Signature xmlns:ds='http://www.w3.org/2000/09/xmldsig#'&gt;...&lt;/ds:Signature&gt; &lt;saml:Subject&gt; &lt;saml:NameID Format='urn:oasis:names:tc:SAML:2.0:nameidformat:uid'&gt; " + employeeID + " &lt;/saml:NameID&gt; &lt;saml:SubjectConfirmation Method='urn:oasis:names:tc:SAML:2.0:cm:bearer'&gt; &lt;saml:SubjectConfirmationData Recipient='https://sp.example.com/SAML2/SSO/POST'NotOnOrAfter='2004-12-05T09:27:05Z'/&gt; &lt;/saml:SubjectConfirmation&gt; &lt;/saml:Subject&gt; &lt;saml:Conditions NotBefore='2004-12-05T09:17:05Z'NotOnOrAfter='2004-12-05T09:27:05Z'&gt; &lt;saml:AudienceRestriction&gt; &lt;saml:Audience&gt;https://sp.example.com/SAML2&lt;/saml:Audience&gt; &lt;/saml:AudienceRestriction&gt; &lt;/saml:Conditions&gt; &lt;saml:AuthnStatement AuthnInstant='2004-12-05T09:22:00Z'SessionIndex='identifier_2'&gt; &lt;saml:AuthnContext&gt; &lt;saml:AuthnContextClassRef&gt;urn:oasis:names:tc:SAML:2.0:ac:classes:u nspecified&lt;/saml:AuthnContextClassRef&gt; &lt;/saml:AuthnContext&gt; &lt;/saml:AuthnStatement&gt; &lt;/saml:Assertion&gt; &lt;/samlp:Response&gt;
  </code></pre>
  
  <p>The provider reccomended I use ADFS 3.0 but I'd like to avoid changing anything on server.  Is there a different package I could use to help all this?</p>