
org.testifyproject.github.dockerjava.netty.exec.AuthCmdExec Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.netty.exec;
import org.testifyproject.slf4j.Logger;
import org.testifyproject.slf4j.LoggerFactory;
import org.testifyproject.testifyproject.fasterxml.jackson.core.type.TypeReference;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.AuthCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.model.AuthResponse;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;
import org.testifyproject.testifyproject.github.dockerjava.netty.MediaType;
import org.testifyproject.testifyproject.github.dockerjava.netty.WebTarget;
public class AuthCmdExec extends AbstrSyncDockerCmdExec implements AuthCmd.Exec {
private static final Logger LOGGER = LoggerFactory.getLogger(AuthCmdExec.class);
public AuthCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
super(baseResource, dockerClientConfig);
}
@Override
protected AuthResponse execute(AuthCmd org.testifyproject.testifyprojectmand) {
WebTarget webResource = getBaseResource().path("/auth");
LOGGER.trace("POST: {}", webResource);
return webResource.request().accept(MediaType.APPLICATION_JSON)
.post(org.testifyproject.testifyprojectmand.getAuthConfig(), new TypeReference() {
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy