diff options
author | Danny van Heumen <danny@dannyvanheumen.nl> | 2015-07-20 21:27:51 +0200 |
---|---|---|
committer | Danny van Heumen <danny@dannyvanheumen.nl> | 2015-07-20 22:29:45 +0200 |
commit | aa5eeee24a5a546bd1f5b83696a231bfe71fc0f9 (patch) | |
tree | 94d8dd2a1a5a54173fc666654cfe9f3d7c1f4868 /src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java | |
parent | d0e0b7b34e6f7727b0c3226c06f9c65cc5e23278 (diff) | |
download | jitsi-aa5eeee24a5a546bd1f5b83696a231bfe71fc0f9.zip jitsi-aa5eeee24a5a546bd1f5b83696a231bfe71fc0f9.tar.gz jitsi-aa5eeee24a5a546bd1f5b83696a231bfe71fc0f9.tar.bz2 |
Removed notion of a 'password' from Google Contacts implementation.
Removed all references to using/requesting/storing a password, since
client login authentication is now deprecated and there is no reason to
believe that this is coming back any time soon.
+ a bit of fine-tuning in exception handling
Diffstat (limited to 'src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java index adcd198..8804bfc 100644 --- a/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java +++ b/src/net/java/sip/communicator/impl/googlecontacts/GoogleContactsServiceImpl.java @@ -12,7 +12,6 @@ import java.util.*; import java.util.regex.*; import net.java.sip.communicator.impl.googlecontacts.configform.*; -import net.java.sip.communicator.service.credentialsstorage.*; import net.java.sip.communicator.service.googlecontacts.*; import net.java.sip.communicator.util.*; @@ -103,8 +102,6 @@ public class GoogleContactsServiceImpl { ConfigurationService configService = GoogleContactsActivator.getConfigService(); - CredentialsStorageService credentialsService = - GoogleContactsActivator.getCredentialsService(); List<String> list = configService.getPropertyNamesByPrefix( CONFIGURATION_PATH, true); @@ -124,10 +121,8 @@ public class GoogleContactsServiceImpl if(prefix == null) prefix = ""; - String password = credentialsService.loadPassword(path); - GoogleContactsConnectionImpl cnx = (GoogleContactsConnectionImpl) - getConnection(login, password); + getConnection(login); cnx.setEnabled(enabled); cnx.setPrefix(prefix); @@ -188,9 +183,6 @@ public class GoogleContactsServiceImpl ConfigurationService configService = GoogleContactsActivator.getConfigService(); - CredentialsStorageService credentialsService = - GoogleContactsActivator.getCredentialsService(); - String login = cnx.getLogin(); String path = CONFIGURATION_PATH + ".acc" + Math.abs(login.hashCode()); @@ -207,8 +199,6 @@ public class GoogleContactsServiceImpl configService.setProperty( path + ".prefix", ((GoogleContactsConnectionImpl)cnx).getPrefix()); - - credentialsService.storePassword(path, cnx.getPassword()); } /** @@ -411,15 +401,13 @@ public class GoogleContactsServiceImpl * Get a <tt>GoogleContactsConnection</tt>. * * @param login login to connect to the service - * @param password password to connect to the service * @return <tt>GoogleContactsConnection</tt>. */ - public GoogleContactsConnection getConnection(String login, - String password) + public GoogleContactsConnection getConnection(String login) { try { - return new GoogleContactsConnectionImpl(login, password); + return new GoogleContactsConnectionImpl(login); } catch(Exception e) { @@ -447,11 +435,10 @@ public class GoogleContactsServiceImpl * <tt>GoogleContactsConnection</tt>. * * @param login login - * @param password password */ - public void addContactSource(String login, String password) + public void addContactSource(String login) { - GoogleContactsActivator.enableContactSource(login, password, false); + GoogleContactsActivator.enableContactSource(login, false); } /** |