// RegistryAuthResolveGRPC resolves the registry authentication from via GRPC
RegistryAuthResolveGRPC resolves the registry authentication from via GRPC
// RegistryAuthResolveGRPC resolves the registry authentication from via GRPC
func RegistryAuthResolveGRPC(client dockerregistryproxyv1.AuthenticationProviderAPIClient) (authn.Authenticator, error) {
	resp, err := client.Provide(context.Background(), &dockerregistryproxyv1.ProvideRequest{})
	if err != nil {
		return nil, err
	}
	cfg := authn.AuthConfig{
		Username:      resp.GetUsername(),
		Password:      resp.GetPassword(),
		Auth:          resp.GetAuth(),
		IdentityToken: resp.GetIdentityToken(),
		RegistryToken: resp.GetRegistryToken(),
	}
	logger.Info("received credentials from auth provider", zap.String("credentials", fmt.Sprintf("%#v", cfg)))
	return authn.FromConfig(cfg), nil
}
func RegistryAuthResolveGRPC ( client dockerregistryproxyv1 . AuthenticationProviderAPIClient ) ( authn . Authenticator , error ) { resp , err := client . Provide ( context . Background ( ) , & dockerregistryproxyv1 . ProvideRequest { } ) if err != nil { return nil , err } cfg := authn . AuthConfig { Username : resp . GetUsername ( ) , Password : resp . GetPassword ( ) , Auth : resp . GetAuth ( ) , IdentityToken : resp . GetIdentityToken ( ) , RegistryToken : resp . GetRegistryToken ( ) , } logger . Info ( " " , zap . String ( " " , fmt . Sprintf ( " " , cfg ) ) ) return authn . FromConfig ( cfg ) , nil }
RegistryAuthResolveGRPC resolves the registry authentication from via GRPC
RegistryAuthResolveGRPC resolves the registry authentication from via GRPC