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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user