Rename Credential.Name to PrincipleName. PrincipleName comes from the security service provider, which may not correspond to the domain user name. For instance, if I'm using kerberos on my domain, my principle may be user@DIVISION.CORP.COM, meanwhile my username might be CORP\user.

This commit is contained in:
antiduh
2014-07-03 21:02:33 +00:00
parent bfaa49d0a3
commit b5b16530cc
4 changed files with 5 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ namespace NSspi.Credentials
/// <summary>
/// Returns the name of the principle of the credential.
/// </summary>
public string Name
public string PrincipleName
{
get
{

View File

@@ -33,11 +33,11 @@ namespace NSspi
clientCred = new ClientCredential( packageName );
serverCred = new ServerCredential( packageName );
Console.Out.WriteLine( clientCred.Name );
Console.Out.WriteLine( clientCred.PrincipleName );
client = new ClientContext(
clientCred,
serverCred.Name,
serverCred.PrincipleName,
ContextAttrib.MutualAuth |
ContextAttrib.InitIdentify |
ContextAttrib.Confidentiality |

View File

@@ -66,7 +66,7 @@ namespace TestClient
this.connection.Disconnected += connection_Disconnected;
// --- UI Fillout ---
this.usernameTextbox.Text = this.cred.Name;
this.usernameTextbox.Text = this.cred.PrincipleName;
UpdateButtons();
}

View File

@@ -66,7 +66,7 @@ namespace TestServer
UpdateButtons();
this.serverUsernameTextbox.Text = this.serverCred.Name;
this.serverUsernameTextbox.Text = this.serverCred.PrincipleName;
}
private void Form1_FormClosing( object sender, FormClosingEventArgs e )