I have a very simple java web app where I can manage user registration and authentication. I want to act this application as SAML identity provider. Then I'm going to create another simple web app, which would require user to be authenticated before he can use it. So basically I want my first app to be IdP and my second app to be service provider. The workflow should be like this: user goes to app2. App2 redirects user to app1 where user gets authenticated. If authentication is successful app1 redirects user to app2 where he has full access. I am relatively new to SAML. Is there any tutorial that would help me to do it painlessly?