本文整理了Java中org.apache.maven.settings.Server.getPassphrase()
方法的一些代码示例,展示了Server.getPassphrase()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getPassphrase()
方法的具体详情如下:
包路径:org.apache.maven.settings.Server
类名称:Server
方法名:getPassphrase
[英]Get the passphrase used in conjunction with the privateKey to authenticate.
[中]获取与私钥一起使用的密码短语以进行身份验证。
代码示例来源:origin: apache/maven
server.setPassphrase( decrypt( server.getPassphrase() ) );
代码示例来源:origin: apache/maven
authentication.setPassphrase( server.getPassphrase() );
代码示例来源:origin: apache/maven
authInfo.setPassword( server.getPassword() );
authInfo.setPrivateKey( server.getPrivateKey() );
authInfo.setPassphrase( server.getPassphrase() );
代码示例来源:origin: apache/maven
if ( server.getPassphrase() != null )
serializer.startTag( NAMESPACE, "passphrase" ).text( server.getPassphrase() ).endTag( NAMESPACE, "passphrase" );
代码示例来源:origin: apache/maven
authBuilder.addPrivateKey( server.getPrivateKey(), server.getPassphrase() );
authSelector.add( server.getId(), authBuilder.build() );
代码示例来源:origin: org.nuiton/maven-helper-plugin
@Override
public String getSecret(Server server) {
return server.getPassphrase();
}
},
代码示例来源:origin: org.nuiton/helper-maven-plugin
@Override
public String getSecret(Server server) {
return server.getPassphrase();
}
},
代码示例来源:origin: org.apache.maven/maven-settings
if ( server.getPassphrase() != null )
serializer.startTag( NAMESPACE, "passphrase" ).text( server.getPassphrase() ).endTag( NAMESPACE, "passphrase" );
代码示例来源:origin: danielflower/multi-module-maven-release-plugin
protected final void configureJsch(final Log log) {
if (!disableSshAgent) {
if (serverId != null) {
final Server server = settings.getServer(serverId);
if (server != null) {
privateKey = privateKey == null ? server.getPrivateKey() : privateKey;
passphrase = passphrase == null ? server.getPassphrase() : passphrase;
} else {
log.warn(format("No server configuration in Maven settings found with id %s", serverId));
}
}
JschConfigSessionFactory.setInstance(new SshAgentSessionFactory(log, knownHosts, privateKey, passphrase));
}
}
代码示例来源:origin: com.itemis.maven.plugins/unleash-maven-plugin
private Authentication createServerAuthentication(Server server) {
Authentication authentication = new Authentication(server.getUsername(), server.getPassword());
authentication.setPrivateKey(server.getPrivateKey());
authentication.setPassphrase(server.getPassphrase());
return authentication;
}
}
代码示例来源:origin: de.julielab/julielab-maven-aether-utilities
public static Map<String, Authentication> getRepositoryAuthenticationsFromMavenSettings() throws SettingsBuildingException {
Map<String, Authentication> authenticationMap = new HashMap<>();
List<Server> servers = getMavenSettings().getServers();
for (Server server : servers) {
if (server.getUsername() != null && server.getPassword() != null) {
Authentication auth = new AuthenticationBuilder().addUsername(server.getUsername()).addPassword(server.getPassword()).build();
authenticationMap.put(server.getId(), auth);
}
if (server.getPassphrase() != null && server.getPrivateKey() != null) {
Authentication auth = new AuthenticationBuilder().addPrivateKey(server.getPrivateKey(), server.getPassphrase()).build();
authenticationMap.put(server.getId(), auth);
}
}
return authenticationMap;
}
代码示例来源:origin: shillner/unleash-maven-plugin
private Authentication createServerAuthentication(Server server) {
Authentication authentication = new Authentication(server.getUsername(), server.getPassword());
authentication.setPrivateKey(server.getPrivateKey());
authentication.setPassphrase(server.getPassphrase());
return authentication;
}
}
代码示例来源:origin: org.apache.maven/maven-ant-tasks
public Authentication( Server server )
{
setUserName( server.getUsername() );
setPassword( server.getPassword() );
setPassphrase( server.getPassphrase() );
setPrivateKey( server.getPrivateKey() );
}
}
代码示例来源:origin: org.apache.maven/maven-artifact-ant
public Authentication( Server server )
{
setUserName( server.getUsername() );
setPassword( server.getPassword() );
setPassphrase( server.getPassphrase() );
setPrivateKey( server.getPrivateKey() );
}
}
代码示例来源:origin: org.apache.continuum/continuum-notifier-wagon
private AuthenticationInfo getAuthenticationInfo( String repositoryId )
{
Settings settings = getSettings();
Server server = settings.getServer( repositoryId );
if ( server == null )
{
return null;
}
wagonManager.addAuthenticationInfo( repositoryId, server.getUsername(), server.getPassword(),
server.getPrivateKey(), server.getPassphrase() );
return wagonManager.getAuthenticationInfo( repositoryId );
}
}
代码示例来源:origin: org.apache.maven.continuum/continuum-notifier-wagon
private AuthenticationInfo getAuthenticationInfo( String repositoryId )
{
Settings settings = getSettings();
Server server = settings.getServer( repositoryId );
if ( server == null )
{
return null;
}
wagonManager.addAuthenticationInfo( repositoryId, server.getUsername(), server.getPassword(),
server.getPrivateKey(), server.getPassphrase() );
return wagonManager.getAuthenticationInfo( repositoryId );
}
}
代码示例来源:origin: spring-cloud/spring-cloud-function
private AuthenticationSelector createAuthenticationSelector(
SettingsDecryptionResult decryptedSettings) {
DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
for (Server server : decryptedSettings.getServers()) {
AuthenticationBuilder auth = new AuthenticationBuilder();
auth.addUsername(server.getUsername()).addPassword(server.getPassword());
auth.addPrivateKey(server.getPrivateKey(), server.getPassphrase());
selector.add(server.getId(), auth.build());
}
return new ConservativeAuthenticationSelector(selector);
}
代码示例来源:origin: org.jboss.forge.furnace/furnace-manager-resolver-maven
private LazyAuthenticationSelector createAuthSelector(final Settings settings,
final DefaultMirrorSelector mirrorSelector)
{
LazyAuthenticationSelector authSelector = new LazyAuthenticationSelector(mirrorSelector);
for (Server server : settings.getServers())
{
authSelector.add(
server.getId(),
new AuthenticationBuilder().addUsername(server.getUsername()).addPassword(server.getPassword())
.addPrivateKey(server.getPrivateKey(), server.getPassphrase()).build());
}
return authSelector;
}
代码示例来源:origin: org.springframework.boot.experimental/spring-boot-thin-launcher
private AuthenticationSelector createAuthenticationSelector(
SettingsDecryptionResult decryptedSettings) {
DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
for (Server server : decryptedSettings.getServers()) {
AuthenticationBuilder auth = new AuthenticationBuilder();
auth.addUsername(server.getUsername()).addPassword(server.getPassword());
auth.addPrivateKey(server.getPrivateKey(), server.getPassphrase());
selector.add(server.getId(), auth.build());
}
return new ConservativeAuthenticationSelector(selector);
}
代码示例来源:origin: org.springframework.boot/spring-boot-cli
private AuthenticationSelector createAuthenticationSelector(
SettingsDecryptionResult decryptedSettings) {
DefaultAuthenticationSelector selector = new DefaultAuthenticationSelector();
for (Server server : decryptedSettings.getServers()) {
AuthenticationBuilder auth = new AuthenticationBuilder();
auth.addUsername(server.getUsername()).addPassword(server.getPassword());
auth.addPrivateKey(server.getPrivateKey(), server.getPassphrase());
selector.add(server.getId(), auth.build());
}
return new ConservativeAuthenticationSelector(selector);
}
内容来源于网络,如有侵权,请联系作者删除!