/** * Getting here means the authentication tried in {@link #getFirstAuthentication(String, String, SVNURL)} * didn't work. */ @Override public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { SVNErrorManager.authenticationFailed("Authentication failed for " + url, null); return null; }
/** * Getting here means the authentication tried in {@link #getFirstAuthentication(String, String, SVNURL)} * didn't work. */ @Override public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { SVNErrorManager.authenticationFailed("Authentication failed for " + url, null); return null; }
/** * Getting here means the authentication tried in {@link #getFirstAuthentication(String, String, SVNURL)} * didn't work. */ @Override public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { SVNErrorManager.authenticationFailed("Authentication failed for " + url, null); return null; }
public static void authenticationFailed(String message, Object messageObject) throws SVNAuthenticationException { authenticationFailed(message, messageObject, Level.FINE); }
public static void authenticationFailed(String message, Object messageObject) throws SVNAuthenticationException { authenticationFailed(message, messageObject, Level.FINE); }
public static void authenticationFailed(String message, Object messageObject) throws SVNAuthenticationException { authenticationFailed(message, messageObject, Level.FINE); }
public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException { if (ISVNAuthenticationManager.SSH.equals(kind) && mySSHIndex + 1 < mySSHAuthentications.size()) { mySSHIndex++; return (SVNAuthentication) mySSHAuthentications.get(mySSHIndex); } else if (ISVNAuthenticationManager.PASSWORD.equals(kind) && myPasswordIndex + 1 < myPasswordAuthentications.size()) { myPasswordIndex++; return (SVNAuthentication) myPasswordAuthentications.get(myPasswordIndex); } else if (ISVNAuthenticationManager.USERNAME.equals(kind) && myUserNameIndex + 1 < myUserNameAuthentications.size()) { myUserNameIndex++; return (SVNAuthentication) myUserNameAuthentications.get(myUserNameIndex); } SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null; }
return (SVNAuthentication) mySSLAuthentications.get(mySSLIndex); SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null;
return (SVNAuthentication) mySSLAuthentications.get(mySSLIndex); SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null;
return (SVNAuthentication) mySSLAuthentications.get(mySSLIndex); 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; } SVNAuthentication auth = myProviders[i].requestClientAuthentication(kind, url, realm, myPreviousErrorMessage, myPreviousAuthentication, myIsStoreAuth); if (auth != null) { myPreviousAuthentication = auth; myLastProviderIndex = i; return auth; } if (i == 3) { SVNErrorManager.cancel("authentication cancelled"); } } SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null; }
public SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url) throws SVNException { if (ISVNAuthenticationManager.SSH.equals(kind) && mySSHAuthentications.size() > 0) { mySSHIndex = 0; return (SVNAuthentication) mySSHAuthentications.get(0); } else if (ISVNAuthenticationManager.PASSWORD.equals(kind) && myPasswordAuthentications.size() > 0) { myPasswordIndex = 0; return (SVNAuthentication) myPasswordAuthentications.get(0); } else if (ISVNAuthenticationManager.USERNAME.equals(kind) && myUserNameAuthentications.size() > 0) { myUserNameIndex = 0; return (SVNAuthentication) myUserNameAuthentications.get(0); } if (ISVNAuthenticationManager.USERNAME.equals(kind)) { if (url.getUserInfo() != null && !"".equals(url.getUserInfo())) { return new SVNUserNameAuthentication(url.getUserInfo(), false); } // client will use default. return new SVNUserNameAuthentication(null, false); } SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null; }
public SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url) throws SVNException { myPreviousAuthentication = null; myPreviousErrorMessage = null; myLastProviderIndex = 0; // iterate over providers and ask for auth till it is found. for (int i = 0; i < myProviders.length; i++) { if (myProviders[i] == null) { continue; } SVNAuthentication auth = myProviders[i].requestClientAuthentication(kind, url, realm, null, null, myIsStoreAuth); if (auth != null) { myPreviousAuthentication = auth; myLastProviderIndex = i; return auth; } if (i == 3) { SVNErrorManager.cancel("authentication cancelled"); } } 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 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; }
SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null;
SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null;
SVNErrorManager.authenticationFailed("Authentication required for ''{0}''", realm); return null;
private void checkAccess(String repository, String path, boolean checkDestinationPath, String destinationPath, String user, int access) throws SVNException { if (getDAVConfig().getSVNAccess() == null) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_INVALID_CONFIG_VALUE, "An error occured while loading configuration file."), SVNLogType.NETWORK); } if (!getDAVConfig().isAnonymousAllowed() && user == null) { SVNErrorManager.authenticationFailed("Anonymous user is not allowed on resource", null); } if (path != null || (path == null && (access & SVNPathBasedAccess.SVN_ACCESS_WRITE) != SVNPathBasedAccess.SVN_ACCESS_NONE)) { if (!getDAVConfig().getSVNAccess().checkAccess(repository, path, user, access)) { if (user == null) { SVNErrorManager.authenticationFailed("Forbidden for anonymous", null); } else { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.NO_AUTH_FILE_PATH), SVNLogType.NETWORK); } } } if (checkDestinationPath) { if (path != null) { if (!getDAVConfig().getSVNAccess().checkAccess(repository, destinationPath, user, access)) { if (user == null) { SVNErrorManager.authenticationFailed("Forbidden for anonymous", null); } else { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.NO_AUTH_FILE_PATH), SVNLogType.NETWORK); } } } } }