Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
public class GoogleAppsDelegate extends EROpenIDManager.DefaultDelegate {

	@Override
	public List<MessageExtension> createFetchMessageExtensions(String userSuppliedString, WORequest request,
			WOContext context) throws MessageException {
		ArrayList<MessageExtension> exts = new ArrayList<MessageExtension>();
		FetchRequest fetchRequest = FetchRequest.createFetchRequest();
		fetchRequest.addAttribute("Email", "http://axschema.org/contact/email", true);
		exts.add(fetchRequest);
		return exts;
	}

}

You'll also need to patch wonder (unless it's been committed) to get Google to remember approved sites.

http://issues.objectstyle.org/jira/browse/WONDER-374?page=allImage Removed

Then override appendToResponse your standard login page with something like this:

Code Block
	public void appendToResponse(WOResponse r, WOContext c) {
		// Assume client and realm exists.
		if (client.doesOpenID()) {
			String url = ((ERXWOContext) c).directActionURLForActionNamed(ERODirectAction.class.getName()
					+ "/openIDRequest?" + "identity=" + client.openIdIdentity() + "&realm="
					+ realm, null);
			r.setHeader(url, "location");
			r.setStatus(302);
		} else {
			super.appendToResponse(r, c);
		}
	}

...

where openid is an XRDS document. comprehensive instructions on setting up the rest is here:

http://jeremiahlee.com/blog/2009/09/28/how-to-setup-openid-with-google-apps/Image Removed