2016-05-27 12:32:26 +03:00
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
|
|
|
"golang.org/x/net/context"
|
|
|
|
|
2016-09-06 21:18:12 +03:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-05-27 12:32:26 +03:00
|
|
|
"github.com/docker/docker/dockerversion"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 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))
|
|
|
|
}
|