Files
WSL/doc/docs/api-reference/csharp/data-classes/authenticateresult.md
0704fa160b Update WSLC SDK API documentation (#41677)
* Update WSLC SDK API documentation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update docs

* Update docs

* Quick fixes

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Craig Loewen <crloewen@microsoft.com>
2026-09-29 10:14:54 -04:00

652 B

AuthenticateResult

Registry authentication data returned by Session.Authenticate.

public sealed class AuthenticateResult
{
    public string IdentityToken { get; }
    public IdentityTokenType TokenType { get; }
}

IdentityToken contains opaque registry authentication data that can be assigned directly to PullImageOptions.RegistryAuth or PushImageOptions.RegistryAuth. TokenType identifies whether it represents an identity token or the supplied credentials.

AuthenticateResult authentication = session.Authenticate(registryUri, username, password);
pullOptions.RegistryAuth = authentication.IdentityToken;