mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-08 17:25:08 -05:00
added handler to fetch credentials (#656)
* added handler to fetch credentials * added credentials to security service rather than agent service
This commit is contained in:
committed by
Karl Burtram
parent
626ce35440
commit
c0e5225187
@@ -14,11 +14,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
/// </summary>
|
||||
public class CredentialInfo
|
||||
{
|
||||
public int Id { get; }
|
||||
public int Id { get; set; }
|
||||
public string Identity { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime DateLastModified { get; }
|
||||
public DateTime CreateDate { get; }
|
||||
public string ProviderName { get; set; }
|
||||
public DateTime DateLastModified { get; set; }
|
||||
public DateTime CreateDate { get; set; }
|
||||
public string ProviderName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,32 @@ using Microsoft.SqlTools.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Get Credential parameters
|
||||
/// </summary>
|
||||
public class GetCredentialsParams: GeneralRequestDetails
|
||||
{
|
||||
public string OwnerUri { get; set; }
|
||||
}
|
||||
|
||||
public class GetCredentialsResult: ResultStatus
|
||||
{
|
||||
public CredentialInfo[] Credentials { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SQL Agent Credentials request type
|
||||
/// </summary>
|
||||
public class GetCredentialsRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition
|
||||
/// </summary>
|
||||
public static readonly
|
||||
RequestType<GetCredentialsParams, GetCredentialsResult> Type =
|
||||
RequestType<GetCredentialsParams, GetCredentialsResult>.Create("security/credentials");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create Credential parameters
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user