1

I´am try to make an openid signon Activity for my Android App.

To this I use JOpenID..

I can get the 'endpoint' and the 'Association'.

But.. I´am Confuse abort the setReturnTo() and setRealm() methods

I has try with 'http://locahost' and 'myip'(hardcode)

manager.setReturnTo("http://locahost");
manager.setRealm("http://*.locahost");

The code look like this.

public void ib_signon(View v)
{
         OpenIdManager manager = new OpenIdManager();

         manager.setReturnTo("http://locahost");
         manager.setRealm("http://*.locahost");

         //gets endpoint
         Endpoint endpoint = manager.lookupEndpoint("Google");
         System.out.println("endpoint=="+endpoint);

         //gets association
         Association association = manager.lookupAssociation(endpoint);
         System.out.println("association=="+association);

         String autUrl = manager.getAuthenticationUrl(endpoint, association);
         System.out.println("Copy the authentication URL in browser:\n" + autUrl);

         //show login-dialog in an webview
         webView = new WebView(this);
         webView.loadUrl(autUrl);
         setContentView(webView);

         /*System.out.println("After successfully sign on in browser, enter the URL of address bar in browser:");
         String ret = readLine();
         HttpServletRequest request = createRequest(ret);
         Authentication authentication = manager.getAuthentication(request, association.getRawMacKey());
         System.out.println(authentication);
         System.out.println("Identity: " + authentication.getIdentity());
         */
         //Intent i = new Intent(this, contactsActivity.class);
         //startActivity(i);
}

After I have write my accounts data in the google-login-dialog(webview),

Google response with:

The page you requested is invalid.  
Voidcode
  • 1,229
  • 1
  • 18
  • 22

0 Answers0