SAML client for Android?

微笑、不失礼 提交于 2019-12-02 02:11:04

问题


I'm working on a project which needs to parse some data from some protected web pages. In order to gain the access those pages, I have to overcome a SAML authetication form (Shibboleth). Is there someone who was able to implement this standard in Android (Java)? I already read this thread: SAML Client implementation for Android? but it doesn't give me a good solution. In fact, I need to get the data of some protected web pages in order to parse it, not to let the user to see the content of such pages. Therefore logging in through a WebView is not what I really need..


回答1:


I think OpenSAML is your best bet for handling the SAML part and then maybe HttpClient for the things you normally will do in a browser. But there will be quite som work implementing this. There is nothing lightweight about SAML.

OpenSAML is just a library helping with processing of SAML messages so it is probably good for very customised stuff like this.




回答2:


After some research, I ended up building it on my own. I carefully followed every redirect, and took note of every cookie created, edited or deleted (Opera, with its in-built option which allows to switch off redirects was the key). The result was a flow which then I replicated in a package ad hoc: the SetUpConnection class, whose task was connecting to the host and keeping track of the cookies. SAML class, which replicated the SAML flow, and finally the Main class, from which I can gather useful information.

Hope it helps.



来源:https://stackoverflow.com/questions/15254216/saml-client-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!