public SVNAuthenticationManager(File configDir, String userName, String password) { super(configDir, SVNWCUtil.createDefaultOptions(configDir, true).isAuthStorageEnabled(), userName, password); }
/** * @deprecated Use {@link #createDefaultAuthenticationManager(File, String, char[])} method. */ public static ISVNAuthenticationManager createDefaultAuthenticationManager(File configDir, String userName, String password) { DefaultSVNOptions options = createDefaultOptions(configDir, true); boolean store = options.isAuthStorageEnabled(); return createDefaultAuthenticationManager(configDir, userName, password, store); }
/** * Creates the subversion custom authentication manager. * * @param userName the user name. * @param password the password. * @param connectionTimeout the connection timeout. * @param readTimeout the read timeout. * @return the subversion custom authentication manager. */ public static SvnCustomAuthenticationManager create(String userName, char[] password, Integer connectionTimeout, Integer readTimeout) { DefaultSVNOptions options = new DefaultSVNOptions(null, true); boolean store = options.isAuthStorageEnabled(); return new SvnCustomAuthenticationManager(store, userName, password, connectionTimeout, readTimeout); }
/** * Creates a default authentication manager that uses the provided * configuration directory and user's credentials. Whether the default auth * storage is used or not depends on the 'store-auth-creds'</i> option that * is looked up in the <i>config</i> file under the <i>[auth]</i> section. * Files <i>config</i> and <i>servers</i> will be created (if they still * don't exist) in the specified directory (they are the same as those ones * you can find in the default SVN's run-time configuration area). * * @param configDir * a new location of the run-time configuration area * @param userName * a user's name * @param password * a user's password * @return a default implementation of the credentials and servers * configuration driver interface */ public static ISVNAuthenticationManager createDefaultAuthenticationManager(File configDir, String userName, String password) { DefaultSVNOptions options = createDefaultOptions(configDir, true); boolean store = options.isAuthStorageEnabled(); return createDefaultAuthenticationManager(configDir, userName, password, store); }
/** * Creates a new instance of this class using the provided {@link ISVNOptions} * driver and user's credentials to make a default implementation of * {@link org.tmatesoft.svn.core.auth.ISVNAuthenticationManager} use them. * That means this <b>SVNClientManager</b> will use the caller's configuration options * (which correspond to options found in the default SVN's <i>config</i> * file), the default SVN's <i>servers</i> configuration and the caller's * credentials. * * @param options a config driver * @param userName a user account name * @param password a user password * @return a new <b>SVNClientManager</b> instance */ public static SVNClientManager newInstance(DefaultSVNOptions options, String userName, String password) { boolean storeAuth = options == null || options.isAuthStorageEnabled(); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(null, userName, password, storeAuth); return new SVNClientManager(options, authManager); }
/** * Creates a new instance of this class using the provided {@link ISVNOptions} * driver and user's credentials to make a default implementation of * {@link org.tmatesoft.svn.core.auth.ISVNAuthenticationManager} use them. * That means this <b>SVNClientManager</b> will use the caller's configuration options * (which correspond to options found in the default SVN's <i>config</i> * file), the default SVN's <i>servers</i> configuration and the caller's * credentials. * * @param options a config driver * @param userName a user account name * @param password a user password * @return a new <b>SVNClientManager</b> instance */ public static SVNClientManager newInstance(DefaultSVNOptions options, String userName, String password) { boolean storeAuth = options == null ? true : options.isAuthStorageEnabled(); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(null, userName, password, storeAuth); return new SVNClientManager(options, authManager); }
/** * Creates a new instance of this class using the provided {@link ISVNOptions} * driver and user's credentials to make a default implementation of * {@link org.tmatesoft.svn.core.auth.ISVNAuthenticationManager} use them. * That means this <b>SVNClientManager</b> will use the caller's configuration options * (which correspond to options found in the default SVN's <i>config</i> * file), the default SVN's <i>servers</i> configuration and the caller's * credentials. * * @param options a config driver * @param userName a user account name * @param password a user password * @return a new <b>SVNClientManager</b> instance */ public static SVNClientManager newInstance(DefaultSVNOptions options, String userName, String password) { boolean storeAuth = options == null ? true : options.isAuthStorageEnabled(); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(null, userName, password, storeAuth); return new SVNClientManager(options, authManager); }
/** * Creates a default authentication manager that uses the provided * configuration directory and user's credentials. Whether the default auth * storage is used or not depends on the 'store-auth-creds'</i> option that * is looked up in the <i>config</i> file under the <i>[auth]</i> section. * Files <i>config</i> and <i>servers</i> will be created (if they still * don't exist) in the specified directory (they are the same as those ones * you can find in the default SVN's run-time configuration area). * * @param configDir * a new location of the run-time configuration area * @param userName * a user's name * @param password * a user's password * @return a default implementation of the credentials and servers * configuration driver interface */ public static ISVNAuthenticationManager createDefaultAuthenticationManager(File configDir, String userName, String password) { DefaultSVNOptions options = createDefaultOptions(configDir, true); boolean store = options.isAuthStorageEnabled(); return createDefaultAuthenticationManager(configDir, userName, password, store); }
/** * Creates a default authentication manager that uses the provided * configuration directory and user's credentials. Whether the default auth * storage is used or not depends on the 'store-auth-creds'</i> option that * is looked up in the <i>config</i> file under the <i>[auth]</i> section. * Files <i>config</i> and <i>servers</i> will be created (if they still * don't exist) in the specified directory (they are the same as those ones * you can find in the default SVN's run-time configuration area). * * @param configDir * a new location of the run-time configuration area * @param userName * a user's name * @param password * a user's password * @return a default implementation of the credentials and servers * configuration driver interface * * @since 1.8.9 */ public static ISVNAuthenticationManager createDefaultAuthenticationManager(File configDir, String userName, char[] password) { DefaultSVNOptions options = createDefaultOptions(configDir, true); boolean store = options.isAuthStorageEnabled(); return createDefaultAuthenticationManager(configDir, userName, password, store); }
public DefaultSVNAuthenticationManager() { this(SVNWCUtil.getDefaultConfigurationDirectory(), SVNWCUtil.createDefaultOptions(SVNWCUtil.getDefaultConfigurationDirectory(), true).isAuthStorageEnabled(), null, null, null, null); }
private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myOptions.setConflictHandler(getConflictHandler()); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } if (myAuthenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager)myAuthenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (myClientManager != null) { myClientManager.dispose(); myClientManager.setAuthenticationManager(myAuthenticationManager); myClientManager.setOptions(myOptions); } }
private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myOptions.setConflictHandler(getConflictHandler()); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } if (myAuthenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager)myAuthenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (myClientManager != null) { myClientManager.dispose(); myClientManager.setAuthenticationManager(myAuthenticationManager); myClientManager.setOptions(myOptions); } }
private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myOptions.setConflictHandler(getConflictHandler()); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } if (myAuthenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager)myAuthenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (myClientManager != null) { myClientManager.dispose(); myClientManager.setAuthenticationManager(myAuthenticationManager); myClientManager.setOptions(myOptions); } }
private void updateSvnOperationsFactory() { //TODO: use tunnelAgent File configDir = this.configDir == null ? null : new File(this.configDir); options = SVNWCUtil.createDefaultOptions(configDir, true); options.setConflictHandler(conflictHandler); options.setConfigEventHandler(getConfigEventHandler(configHandler)); authenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, username, password, options.isAuthStorageEnabled()); if (prompt != null) { authenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(prompt)); } else { authenticationManager.setAuthenticationProvider(null); } if (authenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager) authenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (svnOperationFactory != null) { svnOperationFactory.setAuthenticationManager(authenticationManager); svnOperationFactory.setOptions(options); svnOperationFactory.setEventHandler(getEventHandler()); } }