com.twitter.common.zookeeper.ZooKeeperClient.digestCredentials()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(101)

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

ZooKeeperClient.digestCredentials介绍

[英]Creates a set of credentials for the zoo keeper digest authentication mechanism.
[中]为zoo keeper摘要身份验证机制创建一组凭据。

代码示例

代码示例来源:origin: com.twitter.common.zookeeper.guice/client

/**
 * Convenience method for calling {@link #withCredentials(Credentials)} with digest credentials.
 *
 * @param username Digest authentication user.
 * @param password Digest authentication raw password.
 * @return A modified clone of this configuration.
 */
public ClientConfig withDigestCredentials(String username, String password) {
 return withCredentials(ZooKeeperClient.digestCredentials(username, password));
}

代码示例来源:origin: com.twitter.common/zookeeper-testing

/**
 * Returns a new authenticated zookeeper client connected to the in-process zookeeper server with
 * the default session timeout.  The client is authenticated in the digest authentication scheme
 * with the given {@code username} and {@code password}.
 */
protected final ZooKeeperClient createZkClient(String username, String password) {
 return createZkClient(ZooKeeperClient.digestCredentials(username, password));
}

相关文章