mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 06:10:23 -04:00
14 lines
425 B
Go
14 lines
425 B
Go
![]() |
package daemon
|
||
|
|
||
|
import (
|
||
|
"golang.org/x/net/context"
|
||
|
|
||
|
"github.com/docker/docker/api/types"
|
||
|
"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))
|
||
|
}
|