• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AuthenticationInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.maven.wagon.authentication.AuthenticationInfo的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationInfo类的具体用法?Java AuthenticationInfo怎么用?Java AuthenticationInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AuthenticationInfo类属于org.apache.maven.wagon.authentication包,在下文中一共展示了AuthenticationInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createFetcher

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
private WagonHelper.WagonFetcher createFetcher(final Wagon wagon, TransferListener listener, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo) {
    if(isDiag()) {
        return new WagonHelper.WagonFetcher(wagon, listener, authenticationInfo, proxyInfo) {
            @Override
            public InputStream retrieve(String name) throws IOException, FileNotFoundException {
                String id = wagon.getRepository().getId();
                if(name.contains("properties") && System.getProperty("maven.diag.index.properties." + id) != null) { // NOI18N
                    LOGGER.log(Level.INFO, "maven indexer will use local properties file: {0}", System.getProperty("maven.diag.index.properties." + id)); // NOI18N
                    return new FileInputStream(new File(System.getProperty("maven.diag.index.properties." + id))); // NOI18N
                } else if(name.contains(".gz") && System.getProperty("maven.diag.index.gz." + id) != null) { // NOI18N
                    LOGGER.log(Level.INFO, "maven indexer will use gz file: {0}", System.getProperty("maven.diag.index.gz." + id)); // NOI18N
                    return new FileInputStream(new File(System.getProperty("maven.diag.index.gz." + id))); // NOI18N
                }
                return super.retrieve(name);
            }
        };
    } else {
        return new WagonHelper.WagonFetcher(wagon, listener, authenticationInfo, proxyInfo);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:NexusRepositoryIndexerImpl.java


示例2: testConnectWithConfigSessionFactory

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
/**
 * Tests connection with config session factory
 */
@Test
public void testConnectWithConfigSessionFactory() throws Exception {

    final AuthenticationInfo i = new AuthenticationInfo();
    i.setUserName("git");
    try {
        i.setPrivateKey(new File(Thread.currentThread().getContextClassLoader().getResource("github").toURI())
            .getAbsolutePath());
    } catch (URISyntaxException e) {
        throw new AssertionError(e.getMessage());
    }
    i.setPassphrase(System.getenv("SONAR_GITHUB_TOKEN"));

    final JSch jsch = new AgentJschConfigSessionFactory(i).createDefaultJSch(null);
    assertNotNull(jsch);
    final Session session = jsch.getSession("git", "github.com");
    session.connect(2000);
    assertTrue(session.isConnected());
    session.disconnect();

}
 
开发者ID:trajano,项目名称:wagon-git,代码行数:25,代码来源:JSchTest.java


示例3: connect

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Override
public void connect( Repository repository, AuthenticationInfo authenticationInfo,
                     ProxyInfoProvider proxyInfoProvider )
    throws ConnectionException, AuthenticationException
{

}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:8,代码来源:MockWagon.java


示例4: connectToRepository

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Override
protected void connectToRepository(Repository repository, AuthenticationInfo authenticationInfo,
                                   ProxyInfoProvider proxyInfoProvider) throws AuthenticationException {
    if (this.amazonS3 == null) {

        ClientConfiguration clientConfiguration = S3Utils.getClientConfiguration(proxyInfoProvider);

        this.bucketName = S3Utils.getBucketName(repository);
        this.baseDirectory = S3Utils.getBaseDirectory(repository);

        this.amazonS3 = new AmazonS3Client(new DefaultAWSCredentialsProviderChain(), clientConfiguration);
        Region region = Region.fromLocationConstraint(this.amazonS3.getBucketLocation(this.bucketName));
        this.amazonS3.setEndpoint(region.getEndpoint());
    }
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:16,代码来源:SimpleStorageServiceWagon.java


示例5: AuthenticationInfoAWSCredentialsProviderChain

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
AuthenticationInfoAWSCredentialsProviderChain(AuthenticationInfo authenticationInfo) {
    super(
            new InstanceProfileCredentialsProvider(),
            new ProfileCredentialsProvider(),
            new EnvironmentVariableCredentialsProvider(),
            new SystemPropertiesCredentialsProvider(),
            new InstanceProfileCredentialsProvider());
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:9,代码来源:AuthenticationInfoAWSCredentialsProviderChain.java


示例6: connect

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Override
public final void connect(Repository source, AuthenticationInfo authenticationInfo,
                          ProxyInfoProvider proxyInfoProvider) throws ConnectionException, AuthenticationException {
    this.repository = source;
    this.sessionListenerSupport.fireSessionOpening();
    try {
        connectToRepository(source, authenticationInfo, proxyInfoProvider);
        this.sessionListenerSupport.fireSessionLoggedIn();
        this.sessionListenerSupport.fireSessionOpened();
    } catch (ConnectionException | AuthenticationException e) {
        this.sessionListenerSupport.fireSessionConnectionRefused();
        throw e;
    }
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:15,代码来源:AbstractWagon.java


示例7: connectRepositoryProxyInfo

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Test
public void connectRepositoryProxyInfo() throws ConnectionException, AuthenticationException {
    this.wagon.connect(this.repository, this.proxyInfo);

    assertEquals(this.repository, this.wagon.getRepository());
    verify(this.sessionListenerSupport).fireSessionOpening();
    verify(this.wagon).connectToRepository(eq(this.repository), (AuthenticationInfo) isNull(),
            any(NullProtectingProxyInfoProvider.class));
    verify(this.sessionListenerSupport).fireSessionLoggedIn();
    verify(this.sessionListenerSupport).fireSessionOpened();
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:12,代码来源:AbstractWagonTest.java


示例8: getAuthInfo

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
/**
 * Builds the AuthInfo object.
 */
@Override
protected AuthenticationInfo getAuthInfo() {

    final AuthenticationInfo i = new AuthenticationInfo();
    i.setUserName("git");
    try {
        i.setPrivateKey(new File(Thread.currentThread().getContextClassLoader().getResource("github").toURI())
            .getAbsolutePath());
    } catch (URISyntaxException e) {
        throw new AssertionError(e.getMessage());
    }
    i.setPassphrase(System.getenv("SONAR_GITHUB_TOKEN"));
    return i;
}
 
开发者ID:trajano,项目名称:wagon-git,代码行数:18,代码来源:GitHubPagesWagonTest.java


示例9: authenticationInfo

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
private AuthenticationInfo authenticationInfo( ArtifactRepository repository )
{
    AuthenticationInfo ai = new AuthenticationInfo();
    ai.setUserName( repository.getAuthentication().getUsername() );
    ai.setPassword( repository.getAuthentication().getPassword() );
    return ai;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:8,代码来源:DefaultWagonManager.java


示例10: getAuthenticationInfo

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
public AuthenticationInfo getAuthenticationInfo( String id )
{
    MavenSession session = legacySupport.getSession();

    if ( session != null && id != null )
    {
        MavenExecutionRequest request = session.getRequest();

        if ( request != null )
        {
            List<Server> servers = request.getServers();

            if ( servers != null )
            {
                for ( Server server : servers )
                {
                    if ( id.equalsIgnoreCase( server.getId() ) )
                    {
                        SettingsDecryptionResult result =
                            settingsDecrypter.decrypt( new DefaultSettingsDecryptionRequest( server ) );
                        server = result.getServer();

                        AuthenticationInfo authInfo = new AuthenticationInfo();
                        authInfo.setUserName( server.getUsername() );
                        authInfo.setPassword( server.getPassword() );
                        authInfo.setPrivateKey( server.getPrivateKey() );
                        authInfo.setPassphrase( server.getPassphrase() );

                        return authInfo;
                    }
                }
            }
        }
    }

    // empty one to prevent NPE
   return new AuthenticationInfo();
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:39,代码来源:DefaultWagonManager.java


示例11: connect

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Override
public final void connect(Repository repository, AuthenticationInfo authenticationInfo) throws ConnectionException, AuthenticationException {
    connect(repository);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:RepositoryTransportDeployWagon.java


示例12: connect

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Override
public void connect( Repository source, AuthenticationInfo authenticationInfo )
    throws ConnectionException, AuthenticationException
{
    delegate.connect( source, authenticationInfo );
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:7,代码来源:WagonDelegate.java


示例13: AuthenticationInfoAWSCredentials

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
AuthenticationInfoAWSCredentials(AuthenticationInfo authenticationInfo) {
    this.authenticationInfo = authenticationInfo;
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:4,代码来源:AuthenticationInfoAWSCredentials.java


示例14: connectToRepository

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
protected abstract void connectToRepository(Repository repository, AuthenticationInfo authenticationInfo,
                                    ProxyInfoProvider proxyInfoProvider) throws ConnectionException,
AuthenticationException;
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:4,代码来源:AbstractWagon.java


示例15: AuthenticationInfoAWSCredentialsProvider

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
AuthenticationInfoAWSCredentialsProvider(AuthenticationInfo authenticationInfo) {
    this.authenticationInfo = authenticationInfo;
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:4,代码来源:AuthenticationInfoAWSCredentialsProvider.java


示例16: connectToRepository

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
@Override
protected void connectToRepository(Repository source, AuthenticationInfo authenticationInfo,
                                   ProxyInfoProvider proxyInfo) throws ConnectionException,
        AuthenticationException {
}
 
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:6,代码来源:AbstractWagonTest.java


示例17: connect

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
public void connect(Repository repository, AuthenticationInfo authenticationInfo)
{
  setRepository(repository);
}
 
开发者ID:dunlop-lello,项目名称:rsync-maven-wagon,代码行数:5,代码来源:RsyncWagon.java


示例18: JSchAgentCapableTransportConfigCallback

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
/**
 * Constructs the callback.
 * 
 * @param authenticationInfo
 *            authentication info
 */
public JSchAgentCapableTransportConfigCallback(final AuthenticationInfo authenticationInfo) {

    this.authenticationInfo = authenticationInfo;
}
 
开发者ID:trajano,项目名称:wagon-git,代码行数:11,代码来源:JSchAgentCapableTransportConfigCallback.java


示例19: AgentJschConfigSessionFactory

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
public AgentJschConfigSessionFactory(final AuthenticationInfo authenticationInfo) {

        this.authenticationInfo = authenticationInfo;
    }
 
开发者ID:trajano,项目名称:wagon-git,代码行数:5,代码来源:AgentJschConfigSessionFactory.java


示例20: getAuthenticationInfo

import org.apache.maven.wagon.authentication.AuthenticationInfo; //导入依赖的package包/类
/**
 * this method is only here for backward compat (project-info-reports:dependencies)
 * the default implementation will return an empty AuthenticationInfo
 */
AuthenticationInfo getAuthenticationInfo( String id );
 
开发者ID:gems-uff,项目名称:oceano,代码行数:6,代码来源:WagonManager.java



注:本文中的org.apache.maven.wagon.authentication.AuthenticationInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TileSignature类代码示例发布时间:2022-05-22
下一篇:
Java NickChangeEvent类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap