forked from loafle/openapi-generator-original
[csharp] [Req#15932] Added support for windows authentication by exposing UseDefaultCredentials property (#15935)
* Added support for windows authentication by exposing UseDefaultCredentials property * Updated samples and docs * update doc, samples --------- Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -70,6 +70,8 @@ namespace Org.OpenAPITools.Client
|
||||
/// </summary>
|
||||
private string _basePath;
|
||||
|
||||
private bool _useDefaultCredentials = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the API key based on the authentication name.
|
||||
/// This is the key and value comprising the "secret" for accessing an API.
|
||||
@@ -275,11 +277,21 @@ namespace Org.OpenAPITools.Client
|
||||
/// <summary>
|
||||
/// Gets or sets the base path for API access.
|
||||
/// </summary>
|
||||
public virtual string BasePath {
|
||||
public virtual string BasePath
|
||||
{
|
||||
get { return _basePath; }
|
||||
set { _basePath = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false.
|
||||
/// </summary>
|
||||
public virtual bool UseDefaultCredentials
|
||||
{
|
||||
get { return _useDefaultCredentials; }
|
||||
set { _useDefaultCredentials = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default header.
|
||||
/// </summary>
|
||||
@@ -689,6 +701,7 @@ namespace Org.OpenAPITools.Client
|
||||
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
|
||||
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
|
||||
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
|
||||
UseDefaultCredentials = second.UseDefaultCredentials
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -99,6 +99,11 @@ namespace Org.OpenAPITools.Client
|
||||
/// <value>Password.</value>
|
||||
string Password { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false.
|
||||
/// </summary>
|
||||
bool UseDefaultCredentials { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the servers associated with the operation.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user