当前位置 : 主页 > 网络编程 > 其它编程 >

org.tmatesoft.svn.core.auth.BasicAuthenticationManager.()方法的使用及代码示例

来源:互联网 收集:自由互联 发布时间:2023-07-02
本文整理了Java中org.tmatesoft.svn.core.auth.BasicAuthenticationManager.init()方法的一些 本文整理了Java中org.tmatesoft.svn.core.auth.BasicAuthenticationManager.()方法的一些代码示例,展示了BasicAuthenticationManag
本文整理了Java中org.tmatesoft.svn.core.auth.BasicAuthenticationManager.init()方法的一些

本文整理了Java中org.tmatesoft.svn.core.auth.BasicAuthenticationManager.()方法的一些代码示例,展示了BasicAuthenticationManager.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BasicAuthenticationManager.()方法的具体详情如下:包路径:org.tmatesoft.svn.core.auth.BasicAuthenticationManager类名称:BasicAuthenticationManager方法名:

BasicAuthenticationManager.介绍

[英]Creates an auth manager given a user credential - a username and an ssh private key.[中]在给定用户凭据(用户名和ssh私钥)的情况下创建身份验证管理器。

代码示例

代码示例来源:origin: org.tmatesoft.svnkit/svnkit

/** * Creates an auth manager given user credentials to use. * * @param credentials user credentials * * @since 1.8.9 */public static BasicAuthenticationManager newInstance(SVNAuthentication[] credentials) { return new BasicAuthenticationManager(credentials); }

代码示例来源:origin: SAP/vulnerability-assessment-tool

public void setRepoUrl(URL _u) throws RepoMismatchException { if(_u==null) throw new IllegalArgumentException("Invalid url: " + _u); this.url = _u; // Prepare repository setup (authentication and HTTP proxy) authManager = new BasicAuthenticationManager( "login" , "password" ); final String phost = this.cfg.getString("http.proxyHost", null); final String pport = this.cfg.getString("http.proxyPort", null); if(phost!=null SvnClient.log.info("Using proxy " + phost + ":" + pport); } // Set up repo for trunk (used for searching log entries) this.rootRepo = this.setupRepo(null);}

代码示例来源:origin: com.indeed/proctor-store-svn

@Overridepublic SVNClientManager create() throws Exception { if (requiresAuthentication) { final BasicAuthenticationManager authManager = new BasicAuthenticationManager(username, password); return SVNClientManager.newInstance(null, authManager); } else { return SVNClientManager.newInstance(); }}

代码示例来源:origin: indeedeng/proctor

@Overridepublic SVNClientManager create() throws Exception { if (requiresAuthentication) { final BasicAuthenticationManager authManager = new BasicAuthenticationManager(username, password); return SVNClientManager.newInstance(null, authManager); } else { return SVNClientManager.newInstance(); }}

代码示例来源:origin: stackoverflow.com

private boolean checkPassword(SVNURL url, String user, String password) throws SVNException { SVNRepository svnRepository = SVNRepositoryFactory.create(url); try { svnRepository.setAuthenticationManager(new BasicAuthenticationManager(user, password)); svnRepository.testConnection(); return true; } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_AUTHORIZED) { return false; } else { throw e; } } finally { svnRepository.closeSession(); }}

代码示例来源:origin: stackoverflow.com

final SvnOperationFactory svnOperatiOnFactory= new SvnOperationFactory(); try { final SVNURL url = ...; svnOperationFactory.setAuthenticationManager(new BasicAuthenticationManager("myusername", "mypassword")); final SvnLog log = svnOperationFactory.createLog(); log.addRange(SvnRevisionRange.create(SVNRevision.create(date1), SVNRevision.create(date2))); log.setDiscoverChangedPaths(true); log.setSingleTarget(SvnTarget.fromURL(url)); log.setReceiver(new ISvnObjectReceiver() { @Override public void receive(SvnTarget target, SVNLogEntry logEntry) throws SVNException { ... } }); log.run(); } finally { svnOperationFactory.dispose(); }

代码示例来源:origin: com.synaptix.redpepper/redpepper-automation

public SVNConnector build(String login, String pass) { if (repository == null) { DAVRepositoryFactory.setup(); SVNURL url; try { url = SVNURL.parseURIDecoded(SVNURI + SVNTestRepo); repository = SVNRepositoryFactory.create(url, null); } catch (SVNException e1) { e1.printStackTrace(); } } ISVNAuthenticationManager authManager = new BasicAuthenticationManager(login, pass); repository.setAuthenticationManager(authManager); return instance;}

代码示例来源:origin: indeedeng/proctor

final FileBasedProctorStore.ProctorUpdater updater,final String comment) throws IOException, SVNException, Exception {final BasicAuthenticationManager authManager = new BasicAuthenticationManager(username, password);final SVNClientManager userClientManager = SVNClientManager.newInstance(null, authManager);final SVNWCClient wcClient = userClientManager.getWCClient();

代码示例来源:origin: com.indeed/proctor-store-svn

final FileBasedProctorStore.ProctorUpdater updater,final String comment) throws IOException, SVNException, Exception {final BasicAuthenticationManager authManager = new BasicAuthenticationManager(username, password);final SVNClientManager userClientManager = SVNClientManager.newInstance(null, authManager);final SVNWCClient wcClient = userClientManager.getWCClient();

代码示例来源:origin: org.tmatesoft.svnkit/svnkit-cli

public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (!targets.isEmpty()) { targets.remove(0); } String[] locks = (String[]) targets.toArray(new String[targets.size()]); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); String userName = System.getProperty("user.name", "administrator"); repository.setAuthenticationManager(new BasicAuthenticationManager(userName, "")); repository.setCanceller(getEnvironment()); for (int i = 0; i 代码示例来源:origin: sonia.svnkit/svnkit-cli

public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (!targets.isEmpty()) { targets.remove(0); } String[] locks = (String[]) targets.toArray(new String[targets.size()]); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); String userName = System.getProperty("user.name", "administrator"); repository.setAuthenticationManager(new BasicAuthenticationManager(userName, "")); repository.setCanceller(getEnvironment()); for (int i = 0; i 代码示例来源:origin: com.google.code.maven-scm-provider-svnjava/maven-scm-provider-svnjava

private ISVNAuthenticationManager getAuthManager() { if ( getPrivateKey() != null ) { SVNSSHAuthentication[] auth = new SVNSSHAuthentication[1]; auth[0] = new SVNSSHAuthentication( getUser(), getPrivateKey().toCharArray(), getPassphrase(), -1, false ); return new BasicAuthenticationManager( auth ); } else if ( getUser() != null ) { return new BasicAuthenticationManager( getUser(), getPassword() ); } else { String cOnfigDirectory= SvnUtil.getSettings().getConfigDirectory(); return SVNWCUtil.createDefaultAuthenticationManager( cOnfigDirectory== null ? null : new File( configDirectory ), getUser(), getPassword(), SvnUtil.getSettings().isUseAuthCache() ); } }}

代码示例来源:origin: sonia.svnkit/svnkit-dav

BasicAuthenticationManager authManager = new BasicAuthenticationManager(new SVNAuthentication[] { auth });resourceRepository.setAuthenticationManager(authManager);DAVResource resource = new DAVResource(resourceRepository, this, resourceURI, isSVNClient, deltaBase, version,

上一篇:NET2FTP安装使用教程(图文)
下一篇:没有了
网友评论