Search in sources :

Example 1 with CertKeyPaths

use of com.spotify.sshagenttls.CertKeyPaths in project helios by spotify.

the class AuthenticatingHttpConnectorTest method createAuthenticatingConnectorWithCertFile.

private AuthenticatingHttpConnector createAuthenticatingConnectorWithCertFile() {
    final EndpointIterator endpointIterator = EndpointIterator.of(endpoints);
    final CertKeyPaths clientCertificatePath = CertKeyPaths.create(CERTIFICATE_PATH, KEY_PATH);
    return new AuthenticatingHttpConnector(USER, Suppliers.ofInstance(Optional.<AccessToken>absent()), Optional.<AgentProxy>absent(), Optional.of(clientCertificatePath), endpointIterator, connector);
}
Also used : AccessToken(com.google.auth.oauth2.AccessToken) CertKeyPaths(com.spotify.sshagenttls.CertKeyPaths)

Example 2 with CertKeyPaths

use of com.spotify.sshagenttls.CertKeyPaths in project helios by spotify.

the class AuthenticatingHttpConnector method connectWithCertificateFile.

private HttpURLConnection connectWithCertificateFile(final URI ipUri, final String method, final byte[] entity, final Map<String, List<String>> headers) throws HeliosException {
    final CertKeyPaths clientCertificatePath = this.clientCertificatePath.get();
    log.debug("configuring CertificateFileHttpsHandler with {}", clientCertificatePath);
    delegate.setExtraHttpsHandler(CertFileHttpsHandler.create(false, clientCertificatePath));
    return doConnect(ipUri, method, entity, headers);
}
Also used : CertKeyPaths(com.spotify.sshagenttls.CertKeyPaths)

Aggregations

CertKeyPaths (com.spotify.sshagenttls.CertKeyPaths)2 AccessToken (com.google.auth.oauth2.AccessToken)1