本文整理了Java中org.sonatype.aether.repository.Authentication.getPrivateKeyFile()
方法的一些代码示例,展示了Authentication.getPrivateKeyFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Authentication.getPrivateKeyFile()
方法的具体详情如下:
包路径:org.sonatype.aether.repository.Authentication
类名称:Authentication
方法名:getPrivateKeyFile
[英]Gets the path to the private key file to use for authentication.
[中]获取用于身份验证的私钥文件的路径。
代码示例来源:origin: jcabi/jcabi-aether
/**
* Creates a new authentication with the specified properties.
* @param auth The authentication object.
*/
@SuppressWarnings("PMD.NullAssignment")
public RepositoryAuthentication(final Authentication auth) {
this.username = auth.getUsername();
if (auth.getPassword() == null) {
this.password = null;
} else {
this.password = auth.getPassword().toCharArray();
}
this.privatekeyfile = auth.getPrivateKeyFile();
if (auth.getPassphrase() == null) {
this.passphrase = null;
} else {
this.passphrase = auth.getPassphrase().toCharArray();
}
}
代码示例来源:origin: org.sonatype.aether/aether-impl
private void appendAuth( StringBuilder buffer, Authentication auth )
{
if ( auth != null )
{
SimpleDigest digest = new SimpleDigest();
digest.update( auth.getUsername() );
digest.update( auth.getPassword() );
digest.update( auth.getPrivateKeyFile() );
digest.update( auth.getPassphrase() );
buffer.append( digest.digest() ).append( '@' );
}
}
代码示例来源:origin: sonatype/sonatype-aether
private void appendAuth( StringBuilder buffer, Authentication auth )
{
if ( auth != null )
{
SimpleDigest digest = new SimpleDigest();
digest.update( auth.getUsername() );
digest.update( auth.getPassword() );
digest.update( auth.getPrivateKeyFile() );
digest.update( auth.getPassphrase() );
buffer.append( digest.digest() ).append( '@' );
}
}
代码示例来源:origin: sonatype/sonatype-aether
private AuthenticationInfo getAuthenticationInfo( RemoteRepository repository )
{
AuthenticationInfo auth = null;
Authentication a = repository.getAuthentication();
if ( a != null )
{
auth = new AuthenticationInfo();
auth.setUserName( a.getUsername() );
auth.setPassword( a.getPassword() );
auth.setPrivateKey( a.getPrivateKeyFile() );
auth.setPassphrase( a.getPassphrase() );
}
return auth;
}
内容来源于网络,如有侵权,请联系作者删除!