mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
14 lines
407 B
Go
14 lines
407 B
Go
package daemon
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/moby/moby/api/types/registry"
|
|
"github.com/moby/moby/v2/dockerversion"
|
|
)
|
|
|
|
// AuthenticateToRegistry checks the validity of credentials in authConfig
|
|
func (daemon *Daemon) AuthenticateToRegistry(ctx context.Context, authConfig *registry.AuthConfig) (string, error) {
|
|
return daemon.registryService.Auth(ctx, authConfig, dockerversion.DockerUserAgent(ctx))
|
|
}
|