forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthCmdImpl.java
More file actions
35 lines (28 loc) · 921 Bytes
/
Copy pathAuthCmdImpl.java
File metadata and controls
35 lines (28 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.github.dockerjava.core.command;
import com.github.dockerjava.api.command.AuthCmd;
import com.github.dockerjava.api.exception.UnauthorizedException;
import com.github.dockerjava.api.model.AuthConfig;
import com.github.dockerjava.api.model.AuthResponse;
/**
*
* Authenticate with the server, useful for checking authentication.
*
*/
public class AuthCmdImpl extends AbstrDockerCmd<AuthCmd, AuthResponse> implements AuthCmd {
private AuthConfig authConfig;
public AuthCmdImpl(AuthCmd.Exec exec, AuthConfig authConfig) {
super(exec);
withAuthConfig(authConfig);
}
@Override
public AuthResponse exec() throws UnauthorizedException {
return super.exec();
}
public AuthConfig getAuthConfig() {
return authConfig;
}
public AuthCmd withAuthConfig(AuthConfig authConfig) {
this.authConfig = authConfig;
return this;
}
}