moby/daemon/auth.go
Sebastiaan van Stijn a02abca49a
daemon: use types/registry.AuthConfig
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-29 23:05:18 +02:00

13 lines
464 B
Go

package daemon // import "github.com/docker/docker/daemon"
import (
"context"
"github.com/docker/docker/api/types/registry"
"github.com/docker/docker/dockerversion"
)
// AuthenticateToRegistry checks the validity of credentials in authConfig
func (daemon *Daemon) AuthenticateToRegistry(ctx context.Context, authConfig *registry.AuthConfig) (string, string, error) {
return daemon.registryService.Auth(ctx, authConfig, dockerversion.DockerUserAgent(ctx))
}