summaryrefslogtreecommitdiff
path: root/daemon/auth.go
diff options
context:
space:
mode:
authorVincent Demeester <vincent@sbr.pm>2016-05-27 11:32:26 +0200
committerVincent Demeester <vincent@sbr.pm>2016-05-27 11:32:26 +0200
commitbfa0885c37efe5734d93f5bbb9e6477f66358e7c (patch)
treebbc6b64f713bbd6e02d6c6a9ea5b1c05b231773e /daemon/auth.go
parent75109b32db4c23f469b57fb99300fc5d4a689dce (diff)
downloaddocker-bfa0885c37efe5734d93f5bbb9e6477f66358e7c.tar.gz
Moving some more methods away from daemon.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat (limited to 'daemon/auth.go')
-rw-r--r--daemon/auth.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/daemon/auth.go b/daemon/auth.go
new file mode 100644
index 0000000000..a1400d88ae
--- /dev/null
+++ b/daemon/auth.go
@@ -0,0 +1,13 @@
+package daemon
+
+import (
+ "golang.org/x/net/context"
+
+ "github.com/docker/docker/dockerversion"
+ "github.com/docker/engine-api/types"
+)
+
+// AuthenticateToRegistry checks the validity of credentials in authConfig
+func (daemon *Daemon) AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error) {
+ return daemon.RegistryService.Auth(ctx, authConfig, dockerversion.DockerUserAgent(ctx))
+}