Sorry, which thread you said? I don't understand!

If I can, this is my problem:

I user 2 method: 

Method 1... Step 1 and 2 
Step 1 
String next = "http://www.example.com/welcome.html";; 
String scope = "https://www.google.com/m8/feeds/";; 
boolean secure = false; 
boolean session = true; 
String authSubLogin = AuthSubUtil.getRequestUrl(
next, scope, secure, 
session); 

It's OK 

Step 2 
String token = request.getParameter("token"); 

I get token!!! but then how I can get user information? Where I use my 
secret id and password? 

Method 2... Step 1 and 2 
STEP 1 
String clientId = "xxxxxxxxxxx"; 
String callback = "http://"; + request.getServerName() + ":" + 
request.getServerPort() + request.getContextPath() + "/myUrl.jsp"; 
String authUrl = "https://accounts.google.com/o/oauth2/auth? 
client_id=" + clientId + "&redirect_uri=" + callback + "&scope=https:// 
www.google.com/m8/feeds/&response_type=code"; 
response.sendRedirect(authUrl); 

STEP 2 (myUrl.jsp) 
String code = request.getParameter("code"); 
String clientSecret = "yyyyyyyyyyyyyyyyyyyyy"; 
String newUrl = "https://accounts.google.com/o/oauth2/token";; 
String clientId = "xxxxxxxxxxxxxxxxxxxxxxxxx"; 
String callback = "http://"; + request.getServerName() + ":" + 
request.getServerPort() + request.getContextPath() + "/myUrl.jsp"; 
- mostra testo citato -
and then? How I can get User information? 

Which is right version? Method 1 or 2?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html

Reply via email to