本文整理了Java中org.eclipse.jetty.client.HttpClient.getAuthenticationStore()
方法的一些代码示例,展示了HttpClient.getAuthenticationStore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.getAuthenticationStore()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:getAuthenticationStore
暂无
代码示例来源:origin: jersey/jersey
disableCookies = (disableCookies != null) ? disableCookies : false;
final AuthenticationStore auth = client.getAuthenticationStore();
final Object basicAuthProvider = config.getProperty(JettyClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION);
if (basicAuthProvider != null && (basicAuthProvider instanceof BasicAuthentication)) {
代码示例来源:origin: org.eclipse.jetty/jetty-client
@Override
public void onSuccess(Response response)
{
client.getAuthenticationStore().addAuthenticationResult(authenticationResult);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void onSuccess(Response response)
{
client.getAuthenticationStore().addAuthenticationResult(authnResult);
}
}).send(null);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void onSuccess(Response response)
{
client.getAuthenticationStore().addAuthenticationResult(authnResult);
}
}).send(null);
代码示例来源:origin: labsai/EDDI
@Override
public IRequest setBasicAuthentication(String username, String password, String realm, boolean preemptive) {
if (preemptive) {
request.getHeaders().add("Authorization", "Basic " + Base64.getEncoder().
encodeToString((username + ":" + password).getBytes()));
} else {
AuthenticationStore auth = httpClient.getAuthenticationStore();
auth.addAuthentication(new BasicAuthentication(uri, realm, username, password));
}
return this;
}
代码示例来源:origin: org.apache.cayenne/cayenne-client-jetty
protected void addBasicAuthentication(HttpClient httpClient, String url, String username) {
String password = runtimeProperties.get(ClientConstants.ROP_SERVICE_PASSWORD_PROPERTY);
String realm = runtimeProperties.get(ClientConstants.ROP_SERVICE_REALM_PROPERTY);
if (username != null && password != null) {
if (realm == null && logger.isWarnEnabled()) {
logger.warn("In order to use JettyClient with BASIC Authentication " +
"you should provide Constants.ROP_SERVICE_REALM_PROPERTY.");
return;
}
if (logger.isInfoEnabled()) {
logger.info(
"Adding authentication" +
"\nUser: " + username +
"\nRealm: " + realm);
}
AuthenticationStore auth = httpClient.getAuthenticationStore();
auth.addAuthentication(new BasicAuthentication(URI.create(url), realm, username, password));
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-client
private void applyAuthentication(Request request, URI uri)
{
if (uri != null)
{
Authentication.Result result = getHttpClient().getAuthenticationStore().findAuthenticationResult(uri);
if (result != null)
result.apply(request);
}
}
代码示例来源:origin: openhab/openhab-core
AuthenticationStore authStore = httpClient.getAuthenticationStore();
ProxyConfiguration proxyConfig = httpClient.getProxyConfiguration();
List<Proxy> proxies = proxyConfig.getProxies();
代码示例来源:origin: org.glassfish.jersey.connectors/jersey-jetty-connector
disableCookies = (disableCookies != null) ? disableCookies : false;
final AuthenticationStore auth = client.getAuthenticationStore();
final Object basicAuthProvider = config.getProperty(JettyClientProperties.PREEMPTIVE_BASIC_AUTHENTICATION);
if (basicAuthProvider != null && (basicAuthProvider instanceof BasicAuthentication)) {
代码示例来源:origin: org.eclipse.smarthome.io/org.eclipse.smarthome.io.net
AuthenticationStore authStore = CLIENT.getAuthenticationStore();
ProxyConfiguration proxyConfig = CLIENT.getProxyConfiguration();
List<Proxy> proxies = proxyConfig.getProxies();
代码示例来源:origin: io.digdag/digdag-standards
httpClient.getAuthenticationStore().addAuthenticationResult(new BasicAuthentication.BasicResult(uri, user.get(), password.or("")));
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
Authentication.Result authnResult = client.getAuthenticationStore().findAuthenticationResult(request.getURI());
if (authnResult != null)
authnResult.apply(request);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
Authentication.Result authnResult = client.getAuthenticationStore().findAuthenticationResult(request.getURI());
if (authnResult != null)
authnResult.apply(request);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
for (WWWAuthenticate wwwAuthn : wwwAuthenticates)
authentication = client.getAuthenticationStore().findAuthentication(wwwAuthn.type, uri, wwwAuthn.realm);
if (authentication != null)
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
for (WWWAuthenticate wwwAuthn : wwwAuthenticates)
authentication = client.getAuthenticationStore().findAuthentication(wwwAuthn.type, uri, wwwAuthn.realm);
if (authentication != null)
代码示例来源:origin: org.eclipse.jetty/jetty-client
authentication = client.getAuthenticationStore().findAuthentication(element.getType(), authURI, element.getRealm());
if (authentication != null)
内容来源于网络,如有侵权,请联系作者删除!