By: anish narang user 16 Sep 2016 at 4:11 a.m. CDT

4 Responses
anish narang gravatar
I have setup Gluu IdP and linked it with a Python flask SP. The authentication works perfectly through the browser. Im now looking to login a user through basic Python code, using the Python requests module. Is this possible? The form submission is successful at /oxauth/login but I do not get the redirect URL to proceed from there.

By Mohib Zico Account Admin 16 Sep 2016 at 4:40 a.m. CDT

Mohib Zico gravatar
Anish, I think it would be helpful to understand if you can share: - How you configured your SP. Which protocol? - What error is throwing from Gluu Server side after authentication? - What is the intended behavior? What attributes/scopes are required for your SP etc.

By anish narang user 16 Sep 2016 at 5:43 a.m. CDT

anish narang gravatar
Hi Mohib, 1. The SP is configured using SAML. The SSO works perfectly on the browser. 2. There is no error as such. When I try to submit the username and password to https://server/oxauth/login, I am redirected to the same page. Whereas, on the browser I am redirected to another URL to proceed with the SSO. The request Im making through python mimics the browser request. 3. I have released Display name, first name, gender, transientID.

By Mohib Zico Account Admin 16 Sep 2016 at 9:02 a.m. CDT

Mohib Zico gravatar
>> There is no error as such. When I try to submit the username and password to https://server/oxauth/login, I am redirected to the same page. Whereas, on the browser I am redirected to another URL to proceed with the SSO. The request Im making through python mimics the browser request. Sorry... not clear yet. May be you can share screenshots or any screencast video for better understanding?

By Michael Schwartz Account Admin 16 Sep 2016 at 11:24 a.m. CDT

Michael Schwartz gravatar
SAML does not support sending the credentials... the whole point is that the SP should never see the password. Just sending the username / password won't work, because SAML works by sending XML documents request and responses. You should maybe consider the OAuth2 [resource owner password credential grant](https://gluu.org/docs/2.4.4/admin-guide/oauth2/) This is not an SSO protocol--it will just give you a pass | fail--but no session is created in the person's browser. This patter is highly discouraged. As I mentioned above, it exposes the password to your web application, and the user has no guarantee that the SP is trusted.