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

Add new LoginWithOpts #6

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

jdolitsky
Copy link
Contributor

The login function uses a hardcoded "oras" user-agent.

This change is similar to #5 but for login:

opts := []auth.LoginOption{
    auth.WithLoginHostname("example.com"),
    auth.WithLoginUsername("oscar"),
    auth.WithLoginSecret("opponent"),
    auth.WithLoginUserAgent("my-user-agent"),
}
err := dockerauth.LoginWithOpts(opts...)

Resolves oras-project/oras#240

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
@jdolitsky jdolitsky requested review from deitch and shizhMSFT June 7, 2021 22:15
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jdolitsky jdolitsky merged commit 356245d into oras-project:main Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permit user-agent configuration
3 participants