public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { if (!accepted) { myPreviousErrorMessage = errorMessage; myPreviousAuthentication = authentication; myLastLoadedAuth = null; return; } if (myIsStoreAuth && authentication.isStorageAllowed() && myProviders[2] instanceof IPersistentAuthenticationProvider) { // compare this authentication with last loaded from provider[2]. if (myLastLoadedAuth == null || myLastLoadedAuth != authentication) { ((IPersistentAuthenticationProvider) myProviders[2]).saveAuthentication(authentication, kind, realm); } } myLastLoadedAuth = null; if (!hasExplicitCredentials(kind)) { // do not cache explicit credentials in runtime cache? ((CacheAuthenticationProvider) myProviders[1]).saveAuthentication(authentication, realm); } }
public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { int index = Math.min(myLastProviderIndex + 1, 3); for(int i = index; i < myProviders.length; i++) { if (myProviders[i] == null) { continue; } if ((i == 1 || i == 2) && hasExplicitCredentials(kind)) { continue; } SVNAuthentication auth = myProviders[i].requestClientAuthentication(kind, url, realm, myPreviousErrorMessage, myPreviousAuthentication, myIsStoreAuth); if (auth != null) { if (i == 2) { myLastLoadedAuth = auth; } myPreviousAuthentication = auth; myLastProviderIndex = i; if (auth.isPartial()) { continue; } return auth; } if (i == 3) { SVNErrorManager.cancel("authentication cancelled", SVNLogType.WC); } } SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null; }
public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { int index = Math.min(myLastProviderIndex + 1, 3); for(int i = index; i < myProviders.length; i++) { if (myProviders[i] == null) { continue; } if ((i == 1 || i == 2) && hasExplicitCredentials(kind)) { continue; } SVNAuthentication auth = myProviders[i].requestClientAuthentication(kind, url, realm, myPreviousErrorMessage, myPreviousAuthentication, myIsStoreAuth); if (auth != null) { if (i == 2) { myLastLoadedAuth = auth; } myPreviousAuthentication = auth; myLastProviderIndex = i; if (auth.isPartial()) { continue; } return auth; } if (i == 3) { SVNErrorManager.cancelAuthentication(myPreviousErrorMessage, myPreviousAuthentication); } } SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null; }
public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { int index = Math.min(myLastProviderIndex + 1, 3); for(int i = index; i < myProviders.length; i++) { if (myProviders[i] == null) { continue; } if ((i == 1 || i == 2) && hasExplicitCredentials(kind)) { continue; } SVNAuthentication auth = myProviders[i].requestClientAuthentication(kind, url, realm, myPreviousErrorMessage, myPreviousAuthentication, myIsStoreAuth); if (auth != null) { if (i == 2) { myLastLoadedAuth = auth; } myPreviousAuthentication = auth; myLastProviderIndex = i; if (auth.isPartial()) { continue; } return auth; } if (i == 3) { SVNErrorManager.cancel("authentication cancelled", SVNLogType.WC); } } SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null; }
public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { if (outcomeListener!=null) outcomeListener.acknowledgeAuthentication(accepted,kind,realm,errorMessage,authentication); if (!accepted) { myPreviousErrorMessage = errorMessage; myPreviousAuthentication = authentication; myLastLoadedAuth = null; return; } if (myIsStoreAuth && authentication.isStorageAllowed() && myProviders[2] instanceof IPersistentAuthenticationProvider) { // compare this authentication with last loaded from provider[2]. if (myLastLoadedAuth == null || myLastLoadedAuth != authentication) { ((IPersistentAuthenticationProvider) myProviders[2]).saveAuthentication(authentication, kind, realm); } } myLastLoadedAuth = null; if (!hasExplicitCredentials(kind)) { // do not cache explicit credentials in runtime cache? ((CacheAuthenticationProvider) myProviders[1]).saveAuthentication(authentication, realm); } }
public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException { if (!accepted) { if (isDismissSensitiveDataUponUse()) { authentication.dismissSensitiveData(); } myPreviousErrorMessage = errorMessage; myPreviousAuthentication = authentication; myLastLoadedAuth = null; return; } if (myIsStoreAuth && authentication.isStorageAllowed() && myProviders[2] instanceof ISVNPersistentAuthenticationProvider) { // compare this authentication with last loaded from provider[2]. if (myLastLoadedAuth == null || myLastLoadedAuth != authentication) { ((ISVNPersistentAuthenticationProvider) myProviders[2]).saveAuthentication(authentication, kind, realm); } } myLastLoadedAuth = null; if (!hasExplicitCredentials(kind)) { // do not cache explicit credentials in runtime cache? ((CacheAuthenticationProvider) myProviders[1]).saveAuthentication(authentication, realm); } else { if (isDismissSensitiveDataUponUse()) { authentication.dismissSensitiveData(); } } }