Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: difference between DefaultKeychain and Basic struct #2040

Open
harrypunk opened this issue Jan 12, 2025 · 0 comments
Open

question: difference between DefaultKeychain and Basic struct #2040

harrypunk opened this issue Jan 12, 2025 · 0 comments
Labels
question Further information is requested

Comments

@harrypunk
Copy link

harrypunk commented Jan 12, 2025

I found that DefaultKeychain and Basic both copy the values of username and password. DefaultKeychain merely decode base64 string first.
keychain.go#L172

        return FromConfig(AuthConfig{
		Username:      cfg.Username,
		Password:      cfg.Password,
		Auth:          cfg.Auth,
		IdentityToken: cfg.IdentityToken,
		RegistryToken: cfg.RegistryToken,
	}), nil

basic.go#L24

	return &AuthConfig{
		Username: b.Username,
		Password: b.Password,
	}, nil

Is the bas64 decoding the only difference between them (when other 3 fileds are empty)?

@harrypunk harrypunk added the question Further information is requested label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant