diff options
author | Vincent Demeester <vincent@sbr.pm> | 2016-05-27 11:32:26 +0200 |
---|---|---|
committer | Vincent Demeester <vincent@sbr.pm> | 2016-05-27 11:32:26 +0200 |
commit | bfa0885c37efe5734d93f5bbb9e6477f66358e7c (patch) | |
tree | bbc6b64f713bbd6e02d6c6a9ea5b1c05b231773e /daemon/auth.go | |
parent | 75109b32db4c23f469b57fb99300fc5d4a689dce (diff) | |
download | docker-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.go | 13 |
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)) +} |