Search code examples
authenticationgoogle-gadget

User authentication in google gadget


I'm creating a google gadget (for igoogle or gmail) which will make requests to my server. I wanted to know if there was any way for me to authenticate users without having them authenticate with username/password on my server. is there a way to use the google identity to identify the users (does google give me the google userID in some way?). If i were to use the Oauth option in google gadgets would i be able to get the access_token and use that as an identifier.


Solution

  • You can use the following parameters, it will make google send you a signed request with the open social id :

    params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
    params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;
    params["OAUTH_SERVICE_NAME"] = "HMAC";
    params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;