title: OneLogin for Java - Beginner Issues
body: <p>A few days ago I downloaded java-saml-2.0.1 in the hope of using it to implement SSO via SAML in my (SP) app. I am actually not a Java developer (I am C#) but working on this nonetheless. Also very little familiar with SSO/SAML, so please forgive stupid questions.</p>
  
  <p>1) How do I add a dependency to my project? I have this in my POM.xml file. Is this enough ?</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.onelogin&lt;/groupId&gt;
      &lt;artifactId&gt;java-saml&lt;/artifactId&gt;
      &lt;version&gt;2.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>2) I am reading this article: <a href="https://developers.onelogin.com/saml/java" rel="nofollow noreferrer">Code Your Java App to Provide SSO via OneLogin</a>. Assuming this applies to java-saml-2.0.1, why does it say that I need the files under /com ? Am I supposed to copy those files in my project ? Do I not reference the whole package?</p>
  
  <p>3) Looking at dologin.jsp, what does this code do?</p>
  
  <pre><code>Auth auth = new Auth(request, response);
  if (request.getParameter("attrs") == null) {
      auth.login();
  } else {
      String x = request.getPathInfo();
      auth.login("/java-saml-tookit-jspsample/attrs.jsp");
  }
  </code></pre>
  
  <p>It checks for request.getParameter("attrs"), but then does not use it.
  It sets String x, but then does not use it.
  Why?</p>
  
  <p>4) When setting up <strong>AccountSettings</strong>, can I skip the certificate and do that later or is it always needed ?</p>
  
  <p>5) Essentially we are implementing <a href="https://en.wikipedia.org/wiki/SAML_2.0#Web_Browser_SSO_Profile" rel="nofollow noreferrer">this</a> and the first step is for my SP app to implement <strong>Step 2: (SP--> UA) Redirect to IdP SSO Service</strong>. So, when the user is trying to access my SP, I need to create a SAML Token (?) and send that to IdP. How do I do that? This is where I get stuck.</p>
  
  <p>I looked at the sample, but I don't know hoe to config the settings so it does not work.  </p>
  
  <p>BTW: the IdP is an internal app managed by a different division.</p>