本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.generateContainerToken()
方法的一些代码示例,展示了ZooKeeperUtils.generateContainerToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperUtils.generateContainerToken()
方法的具体详情如下:
包路径:io.fabric8.zookeeper.utils.ZooKeeperUtils
类名称:ZooKeeperUtils
方法名:generateContainerToken
暂无
代码示例来源:origin: jboss-fuse/fabric8
@Override
public Object call(Git git, GitContext context) throws Exception {
ProfileRegistry registry = fabricService.adapt(ProfileRegistry.class);
Map<String, String> properties = registry.getDataStoreProperties();
String username;
String password;
if (properties != null && properties.containsKey("gitRemoteUser")
&& properties.containsKey("gitRemotePassword")) {
username = properties.get("gitRemoteUser");
password = properties.get("gitRemotePassword");
} else {
username = ZooKeeperUtils.getContainerLogin(runtimeProperties);
password = ZooKeeperUtils.generateContainerToken(runtimeProperties, curator);
}
remoteUrl[0] = git.getRepository().getConfig().getString("remote", "origin", "url");
Iterable<PushResult> results = git.push()
.setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password))
.setPushTags()
.setPushAll()
.call();
logPushResult(results, git.getRepository(), verbose);
return null;
}
};
代码示例来源:origin: jboss-fuse/fabric8
private CredentialsProvider getCredentialsProvider() {
Map<String, String> properties = getDataStoreProperties();
String username;
String password;
RuntimeProperties sysprops = runtimeProperties.get();
username = ZooKeeperUtils.getContainerLogin(sysprops);
password = ZooKeeperUtils.generateContainerToken(sysprops, curator.get());
if (isExternalGitConfigured(properties)) {
username = getExternalUser(properties);
password = getExternalCredential(properties);
}
return new UsernamePasswordCredentialsProvider(username, password);
}
代码示例来源:origin: io.fabric8/fabric-git
private CredentialsProvider getCredentialsProvider() {
Map<String, String> properties = getDataStoreProperties();
String username;
String password;
if (isExternalGitConfigured(properties)) {
username = getExternalUser(properties);
password = getExternalCredential(properties);
} else {
RuntimeProperties sysprops = runtimeProperties.get();
username = ZooKeeperUtils.getContainerLogin(sysprops);
password = ZooKeeperUtils.generateContainerToken(sysprops, curator.get());
}
return new UsernamePasswordCredentialsProvider(username, password);
}
内容来源于网络,如有侵权,请联系作者删除!