NanoByte.Common  2.9.0
NanoByte.Common.Native.WindowsCredentials Class Reference

Provides an interface to the Windows Credentials API. Supported on Windows XP or newer. More...

Static Public Member Functions

static bool IsCredentialStored (string target)
 Determines whether there are any credentials stored for a specific target. More...
 
static NetworkCredential PromptGui (string target, WindowsCredentialsFlags flags, string? title=null, string? message=null, IntPtr owner=default)
 Prompts the user for credentials using a GUI dialog. More...
 
static NetworkCredential PromptCli (string target, WindowsCredentialsFlags flags)
 Prompts the user for credentials using a command-line interface. More...
 

Detailed Description

Provides an interface to the Windows Credentials API. Supported on Windows XP or newer.

Member Function Documentation

◆ IsCredentialStored()

static bool NanoByte.Common.Native.WindowsCredentials.IsCredentialStored ( string  target)
inlinestatic

Determines whether there are any credentials stored for a specific target.

Parameters
targetA string uniquely identifying the target the credentials are intended for.
Exceptions
PlatformNotSupportedExceptionThe current platform does not support the Credentials API. Needs Windows XP or newer.

◆ PromptCli()

static NetworkCredential NanoByte.Common.Native.WindowsCredentials.PromptCli ( string  target,
WindowsCredentialsFlags  flags 
)
inlinestatic

Prompts the user for credentials using a command-line interface.

Parameters
targetA string uniquely identifying the target the credentials are intended for.
flagsFlags for configuring the prompt.
Exceptions
PlatformNotSupportedExceptionThe current platform does not support the Credentials API. Needs Windows XP or newer.

◆ PromptGui()

static NetworkCredential NanoByte.Common.Native.WindowsCredentials.PromptGui ( string  target,
WindowsCredentialsFlags  flags,
string?  title = null,
string?  message = null,
IntPtr  owner = default 
)
inlinestatic

Prompts the user for credentials using a GUI dialog.

Parameters
targetA string uniquely identifying the target the credentials are intended for.
flagsFlags for configuring the prompt.
titleThe title of the dialog.
messageThe message to display in the dialog.
ownerThe parent window for the dialog; can be null.
Exceptions
PlatformNotSupportedExceptionThe current platform does not support the Credentials API. Needs Windows XP or newer.

The documentation for this class was generated from the following file: