71 lines
1.4 KiB
C#
71 lines
1.4 KiB
C#
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()
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|