New project to interface with the Microsoft Windows SSPI integration authentication API.

This commit is contained in:
antiduh
2014-06-18 21:26:43 +00:00
commit 87692b3cc6
9 changed files with 329 additions and 0 deletions

70
Credential.cs Normal file
View File

@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NSspi
{
public class Credential : IDisposable
{
private bool disposed;
private SecurityPackage securityPackage;
public Credential(SecurityPackage package, CredentialType credentialType)
{
this.disposed = false;
Init();
}
~Credential()
{
Dispose( false );
}
public SecurityPackage SecurityPackage
{
get
{
if( this.disposed )
{
throw new ObjectDisposedException( base.GetType().Name );
}
return this.securityPackage;
}
}
public string GetName()
{
return null;
}
// TODO use safe handle ...
public IntPtr CredentialHandle
{
get
{
return IntPtr.Zero;
}
}
public void Dispose()
{
Dispose( true );
GC.SuppressFinalize( this );
}
protected virtual void Dispose( bool disposing )
{
this.disposed = true;
}
private void Init()
{
}
}
}