1

I am writing an Android app that makes calls to a REST Api. The user must be logged in and in order to do so, he must authenticate on the server which in turn redirects to the Identity Provider of my university.

My idea was to let the user log in via the android in-app browser and then extract the session cookie (and csrf, if necessary) into the app's AbstractAccountAuthenticator once the user is logged in.

How can I do this? I would also be happy about some helpful links. And secondly, is my way really the way to go?

Konstantin Schubert
  • 3,242
  • 1
  • 31
  • 46
  • if I understood, you want to do is HTTP Basic Authentication, look at http://stackoverflow.com/questions/1968416/how-to-do-http-authentication-in-android – Marckaraujo Jul 03 '15 at 14:49
  • I am not sure.. I need to follow some redirects. Not as important, but I also want to display some information from the login page. I was researching a bit in the meantime and I think this here https://stackoverflow.com/questions/11100086/android-extracting-cookies-after-login-in-webview fits my needs better. – Konstantin Schubert Jul 03 '15 at 14:53
  • This page gives you more information: https://stackoverflow.com/questions/8080761/sharing-cookies-from-webview-with-basichttprequest-on-android?rq=1, however your question may be marked as duplicated. – Marckaraujo Jul 03 '15 at 14:57

0 Answers0