title: SAML/ADFS node.js implementation guide?
body: <p>I'd like to preface this by saying that until now, I hadn't even HEARD of SAML, much less developed a SSO strategy involving it.  That, combined with the fact that I've barely been doing node for a year makes for a glorious newbie sandwich.  Currently, I have a client who uses SAML and ADFS as their SSO provider.  I am already using passport.js for local logins, so using passport-saml seems to be the way to go to implement the SSO using SAML/ADFS.  In doing my research, I've found a couple different implementation guides, but since I literally know NOTHING about this process, I could use a few pointers.  </p>
  
  <p>In the passport-saml documentation, I found the following for a strategy proven to work with ADFS (according to the docs):</p>
  
  <pre><code>{
    entryPoint: 'https://ad.example.net/adfs/ls/',
    issuer: 'https://your-app.example.net/login/callback',
    callbackUrl: 'https://your-app.example.net/login/callback',
    cert: 'MIICizCCAfQCCQCY8tKaMc0BMjANBgkqh ... W==',
    identifierFormat: null
  }
  </code></pre>
  
  <p>I suppose my main question is where does this cert come from?  Is this a cert I generate on my server via SSL?  Does the provider provide it?</p>
  
  <p>In my searching, I have also found this: <a href="https://github.com/auth0/passport-wsfed-saml2">https://github.com/auth0/passport-wsfed-saml2</a>, which is based on passport-saml.  The following configuration is suggested for ADFS:</p>
  
  <pre><code>{
    path: '/login/callback',
    realm: 'urn:node:app',
    homeRealm: '', // optionally specify an identity provider 
    identityProviderUrl: 'https://auth10-dev.accesscontrol.windows.net/v2/wsfederation',
    cert: 'MIIDFjCCAf6gAwIBAgIQDRRprj9lv5 ... ='
  }
  </code></pre>
  
  <p>In this example, the path object is obvious, and my provider has already given me an providerURL.  But realm makes no sense to me, and there's that darn cert again.</p>
  
  <p>Could someone provide me with an "explain-like-i'm-five" way of implementing SAML/ADFS SSO in a node.js site?  Or help me make heads or tails of the argument objects requested by the two solutions I've outlined?  Much appreciated in advance!</p>