On Mon, Mar 27, 2017 at 3:07 PM, Mitja Jesenicnik Kotnik <mitja.kotnik@cloud.si> wrote:
Yes, I was able to do that. But the WebView still saved the Cookies for that session, so I had to also delete the Cookies from WebView in Android so that the next time it asked me for the password again. 

If you are authenticating against Google's OAuth you don't want to use the WebView.

You might want to give : https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html a look.

To make AGDroid Authz use the system browser instead of the WebView you can set withIntent(true) on the configuration.

A special note about OAuth 2 and logging out, AGDroid will remove your session locally in the app, but the OAuth 2 spec does not provide a mechanism for logging you out of the server component.  Because it implements OAuth 2, the library can't support the behavior you are trying to do.  
 

On Mon, Mar 27, 2017 at 2:58 PM, Summers Pittman <supittma@redhat.com> wrote:
We don't have an explicit logout method, but you should be able to delete the session using AuthzModule.deleteAccount().

On Mon, Mar 27, 2017 at 5:11 AM, Mitja Jesenicnik Kotnik <mitja.kotnik@cloud.si> wrote:
Hello,

I'm using AeroGear to connect to a Keycloak server and retrieve data. When I tried it for the first time it opened a WebView and promted me to enter my password and username. Then when it was succesful I opened MainActivity.

Now my question is how can I implement the logout functionality, since the app dosen't ask me again for my credentials (username, password) but just sends a succes and opens MainActivity.

Thank you for your help in advance.

Best regards,
Mitja

_______________________________________________
Aerogear-users mailing list
Aerogear-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
Aerogear-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users



_______________________________________________
Aerogear-users mailing list
Aerogear-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users