Gal,
Its stated that "In particular, you can only switch between Google
Accounts and OpenID (Federated Login)." at
http://code.google.com/appengine/docs/java/users/overview.html#Authentication_Options
You need to use Federated login option and it can be selected later as
I did too. But for the login thing some changes need to be made. I've
an example code that may help you. I'm not a Java expert so it takes
me a day to figure out how to change the code for federated login. The
same code which work for Google accounts don't work with federated
login.
There is a domain parameter when setting the loginURL, its the domain
user wants to login with. You can only get users email address and
split the domain from it and use it here. Hope it helps.
Set<String> attributesRequest = new HashSet<String>();
attributesRequest.add("openid.mode=checkid_setup");
attributesRequest.add("openid.ns=http://specs.openid.net/auth/2.0");
attributesRequest.add("openid.return_to=http://
your_return_address_after_users_logs_in");
attributesRequest.add("openid.claimed_id=http://specs.openid.net/auth/
2.0/identifier_select");
attributesRequest.add("openid.identity=http://specs.openid.net/auth/
2.0/identifier_select");
attributesRequest.add("openid.realm=http://
your_web_address_as_you_set_in_manifest");
attributesRequest.add("openid.ns.ax=http://openid.net/srv/ax/1.0");
attributesRequest.add("openid.ax.mode=fetch_request");
attributesRequest.add("openid.ax.type.attr0=http://axschema.org/
contact/email");
attributesRequest.add("openid.ax.type.attr1=http://schema.openid.net/
contact/email&openid.ax.required=attr0,attr1,auto2");
attributesRequest.add("openid.sreg=http://openid.net/extensions/sreg/
1.1&openid.sreg.required=email");
attributesRequest.add("openid.ns.ui=http://specs.openid.net/extensions/
ui/1.0");
attributesRequest.add("openid.ax.type.auto2=http://www.google.com/
accounts/api/federated-login/id");
String loginURL = userService.createLoginURL("http://
your_return_address_after_users_logs_in", "authDomain", "https://
www.google.com/accounts/o8/site-xrds?hd="+domain, attributesRequest);
String logoutURL = userService.createLogoutURL("http://
your_return_address_after_users_logs_out", "authDomain");
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.