Skip to content

Get token from AuthenticateAsync #493

Open
@Emdot

Description

What version of Docker.DotNet?:

fork from main as of 2/14/2021 (commit 8e3cf4f)

Problem:
ISystemOperations.AuthenticateAsync does not provide a way for the caller to get the token that was returned in the REST response.

Its signature is Task AuthenticateAsync(AuthConfig authConfig, CancellationToken cancellationToken = default(CancellationToken)), but it should probably be Task<AuthResponse> AuthenticateAsync(AuthConfig authConfig, CancellationToken cancellationToken = default(CancellationToken)) instead.

Other details:
I'm happy to submit a PR, but what's this project's preferred way to handle changes that would break binary compatibility? Just changing the return type would be breaking. An overload with an out parameter isn't possible because it's an async method. Are you OK with adding an Authenticate2Async method or similar?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions