return fgSharedAuthToken;
}
private static String internalGetGoogleAuthToken(String email, String pw, IProgressMonitor monitor) throws ConnectionException, URISyntaxException, IOException {
URI uri = new URI(GOOGLE_LOGIN_URL);
IProtocolHandler handler = Owl.getConnectionService().getHandler(uri);
if (handler != null) {
/* Google Specific Parameters */
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("accountType", "GOOGLE"); //$NON-NLS-1$ //$NON-NLS-2$
parameters.put("Email", email); //$NON-NLS-1$
parameters.put("Passwd", pw); //$NON-NLS-1$
parameters.put("service", "reader"); //$NON-NLS-1$ //$NON-NLS-2$
parameters.put("source", "RSSOwl.org-RSSOwl-" + Activator.getDefault().getVersion()); //$NON-NLS-1$ //$NON-NLS-2$
Map<Object, Object> properties = new HashMap<Object, Object>();
properties.put(IConnectionPropertyConstants.PARAMETERS, parameters);
properties.put(IConnectionPropertyConstants.POST, Boolean.TRUE);
properties.put(IConnectionPropertyConstants.CON_TIMEOUT, getConnectionTimeout());
BufferedReader reader = null;
try {
InputStream inS = handler.openStream(uri, monitor, properties);
reader = new BufferedReader(new InputStreamReader(inS));
String line;
while (!monitor.isCanceled() && (line = reader.readLine()) != null) {
if (line.startsWith(AUTH_IDENTIFIER))
return line.substring(AUTH_IDENTIFIER.length());