mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-26 03:49:23 +08:00
Added UniqueId property to ICredential
This commit is contained in:
@@ -15,6 +15,13 @@ namespace mRemoteNGTests.Credential
|
||||
_credentialRecord = new CredentialRecord();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UuidIsUnique()
|
||||
{
|
||||
var credRecord2 = new CredentialRecord();
|
||||
Assert.That(_credentialRecord.UniqueId, Is.Not.EqualTo(credRecord2.UniqueId));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void HasUsername()
|
||||
{
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using System.Security;
|
||||
using System;
|
||||
using System.Security;
|
||||
|
||||
|
||||
namespace mRemoteNG.Credential
|
||||
{
|
||||
public class CredentialRecord : ICredential
|
||||
{
|
||||
public Guid UniqueId { get; } = Guid.NewGuid();
|
||||
|
||||
public string Username { get; set; } = "";
|
||||
|
||||
public SecureString Password { get; set; } = new SecureString();
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using System.Security;
|
||||
using System;
|
||||
using System.Security;
|
||||
|
||||
|
||||
namespace mRemoteNG.Credential
|
||||
{
|
||||
public interface ICredential
|
||||
{
|
||||
Guid UniqueId { get; }
|
||||
string Username { get; set; }
|
||||
SecureString Password { get; set; }
|
||||
string Domain { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user