Hello Shushu, Revoking the token is definitely a good practice to follow since a they are otherwise valid indefinitely, unless the user manually unlinks the service from their profile. The revocation process should also automatically unlink a service from a profile. A good way to test the revocation process is to use the Mt. Tabor Health or H9 demo applications listed at:
http://code.google.com/apis/health/getting_started.html#MtTabor Using the Mt. Tabor application, you will be able to generate tokens, linking the service to a profile, and revoke tokens as well, severing the link. A good way to test the code you using to revoke the token and unlink the service from the profile is to use the Mt. Tabor H9 application to create a non-secure token (make sure "Secure" is set to "no" when you create the token. You should be able to copy the generated token into your code, use it to make requests to H9, and revoke it, as follows: H9Service service = new H9Service("My Service"); service.setAuthSubToken(token); // Use the service to add or retrieve notices. AuthSubUtil.revokeToken(token, null); // Using the service after the revocation will cause an exception to be thrown. Let me know how this works! I've used the Mt. Tabor application and the above code a fair amount, and haven't seen any issues with the automatic unlinking. If the problem persists, we can certainly delve a bit deeper. p...@google On Apr 21, 2:27 am, shushu <[email protected]> wrote: > Hi, > I am trying to answer the need of unlinking a profile from H9. > Following "best practices" (http://code.google.com/intl/iw/apis/health/ > best_practices.html) I delete the token from my server, but of course > it doesn't delete my aplication from the H9 profile. > > Following this post > -http://code.google.com/intl/iw/apis/gdata/docs/auth/authsub.html#revo... > - I tried torevokethe token. It succeeded (the token was useless), > but it changed nothing in the profile. > > Is there a way to unlink the application and remove it from the > profile ? > > Regards, > Shushu > > -- > You received this message because you are subscribed to the Google Groups > "Google Health Developers" 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 > athttp://groups.google.com/group/googlehealthdevelopers?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Health Developers" 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/googlehealthdevelopers?hl=en.
