Added flush AuthToken cache API.
This commit is contained in:
parent
2342ee4dd0
commit
099e4cabfc
@ -70,6 +70,12 @@ namespace Novell.Casa.Client.Auth
|
||||
[In] SSCS_EXT_T ext
|
||||
);
|
||||
|
||||
[DllImport(AUTH_LIBRARY, CharSet = CharSet.None)]
|
||||
private static extern int CleanUpAuthTokenCacheEx
|
||||
(
|
||||
[In] SSCS_EXT_T ext
|
||||
);
|
||||
|
||||
|
||||
public Authtoken()
|
||||
{
|
||||
@ -94,7 +100,7 @@ namespace Novell.Casa.Client.Auth
|
||||
return ObtainAuthToken(sService, sHost, null);
|
||||
}
|
||||
|
||||
private static byte[] ObtainAuthToken(string sService, string sHost, WinLuid luid)
|
||||
public static byte[] ObtainAuthToken(string sService, string sHost, WinLuid luid)
|
||||
{
|
||||
int rcode = 0;
|
||||
byte[] baService = null;
|
||||
@ -189,6 +195,54 @@ namespace Novell.Casa.Client.Auth
|
||||
}
|
||||
}
|
||||
|
||||
public static void CleanUpAuthTokenCache(WinLuid luid)
|
||||
{
|
||||
SSCS_EXT_T ext = new SSCS_EXT_T();
|
||||
LUID sluid;
|
||||
bool bLuidPassedIn = false;
|
||||
|
||||
if ((luid != null) &&
|
||||
((luid.GetHighPart() != 0) || (luid.GetLowPart() != 0)))
|
||||
{
|
||||
// allocate a structure to marshal
|
||||
sluid = new LUID();
|
||||
sluid.luidHigh = luid.GetHighPart();
|
||||
sluid.luidLow = luid.GetLowPart();
|
||||
|
||||
ext.extID = 1;
|
||||
ext.version = 1;
|
||||
ext.ext = Marshal.AllocHGlobal(Marshal.SizeOf(sluid));
|
||||
|
||||
Marshal.StructureToPtr(sluid, ext.ext, false);
|
||||
bLuidPassedIn = true;
|
||||
}
|
||||
|
||||
// Do the call
|
||||
try
|
||||
{
|
||||
if (bLuidPassedIn)
|
||||
{
|
||||
CleanUpAuthTokenCacheEx(ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
CleanUpAuthTokenCacheEx(null);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogMessage(e.ToString());
|
||||
}
|
||||
|
||||
if (ext.ext != IntPtr.Zero)
|
||||
Marshal.FreeHGlobal(ext.ext);
|
||||
}
|
||||
|
||||
public static void CleanUpAuthTokenCache()
|
||||
{
|
||||
CleanUpAuthTokenCache(null);
|
||||
}
|
||||
|
||||
private static void LogMessage(string sMessage)
|
||||
{
|
||||
System.Diagnostics.Trace.WriteLine("(C#)AuthToken: " + sMessage);
|
||||
|
@ -49,8 +49,8 @@ namespace TestClientAuth
|
||||
try
|
||||
{
|
||||
|
||||
WinLuid luid = new WinLuid(1234, 5678);
|
||||
Authtoken.ObtainAuthToken("testService", args[0], luid);
|
||||
//WinLuid luid = new WinLuid(1234, 5678);
|
||||
Authtoken.ObtainAuthToken("testService", args[0]);
|
||||
|
||||
byte[] baToken = Authtoken.ObtainAuthToken("testService", args[0]);
|
||||
Console.WriteLine("Token returned: ("+ baToken.Length + ")");
|
||||
@ -61,6 +61,11 @@ namespace TestClientAuth
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("Press enter to continue");
|
||||
Console.ReadLine();
|
||||
|
||||
// Cleanup the AuthTokenCache
|
||||
Console.WriteLine("Cleaning the cache");
|
||||
Authtoken.CleanUpAuthTokenCache();
|
||||
Console.WriteLine("Done cleaning the cache");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -1,109 +1,106 @@
|
||||
<VisualStudioProject>
|
||||
<CSHARP
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{0EA635EA-97F2-4950-B36B-8151ED858DA4}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = "App.ico"
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "TestClientAuth"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "Exe"
|
||||
PreBuildEvent = ""
|
||||
PostBuildEvent = ""
|
||||
RootNamespace = "TestClientAuth"
|
||||
RunPostBuildEvent = "OnBuildSuccess"
|
||||
StartupObject = ""
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "DEBUG;TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "true"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\Debug\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
AllowUnsafeBlocks = "false"
|
||||
BaseAddress = "285212672"
|
||||
CheckForOverflowUnderflow = "false"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = "TRACE"
|
||||
DocumentationFile = ""
|
||||
DebugSymbols = "false"
|
||||
FileAlignment = "4096"
|
||||
IncrementalBuild = "false"
|
||||
NoStdLib = "false"
|
||||
NoWarn = ""
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\Release\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "4"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.XML"
|
||||
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
|
||||
/>
|
||||
<Reference
|
||||
Name = "Novell.Casa.Client"
|
||||
Project = "{1BA1FC97-5AF1-4506-A7FD-EBFD46D361A0}"
|
||||
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
|
||||
/>
|
||||
</References>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "App.ico"
|
||||
BuildAction = "Content"
|
||||
/>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Class1.cs"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</CSHARP>
|
||||
</VisualStudioProject>
|
||||
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0EA635EA-97F2-4950-B36B-8151ED858DA4}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>App.ico</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>TestClientAuth</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>TestClientAuth</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Novell.Casa.Client.Auth, Version=1.7.2659.17530, Culture=neutral, PublicKeyToken=ed0eb71059ea593b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Novell.Casa.Authtoken\bin\Debug\Novell.Casa.Client.Auth.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.XML">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="App.ico" />
|
||||
<Compile Include="AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Class1.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -94,6 +94,20 @@ ObtainAuthToken(
|
||||
//=======================================================================--
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
extern void SSCS_CALL
|
||||
CleanUpAuthTokenCache(void);
|
||||
//
|
||||
// Arguments: None.
|
||||
//
|
||||
// Returns:
|
||||
// Nothing
|
||||
//
|
||||
// Description:
|
||||
// Flush the AuthToken cache.
|
||||
//=======================================================================--
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif // #if defined(__cplusplus) || defined(c_plusplus)
|
||||
|
@ -51,7 +51,7 @@ extern "C"
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
CasaStatus SSCS_CALL
|
||||
extern CasaStatus SSCS_CALL
|
||||
ObtainAuthTokenEx(
|
||||
IN const char *pServiceName,
|
||||
IN const char *pHostName,
|
||||
@ -101,6 +101,25 @@ ObtainAuthTokenEx(
|
||||
//=======================================================================--
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
extern void SSCS_CALL
|
||||
CleanUpAuthTokenCacheEx(
|
||||
IN const void *pCredStoreScope);
|
||||
//
|
||||
// Arguments:
|
||||
// pCredStoreScope -
|
||||
// Pointer to CASA structure for scoping credential store access
|
||||
// to specific users. This can only be leveraged by applications
|
||||
// running in the context of System.
|
||||
//
|
||||
// Returns:
|
||||
// Nothing
|
||||
//
|
||||
// Description:
|
||||
// Flush the AuthToken cache.
|
||||
//=======================================================================--
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif // #if defined(__cplusplus) || defined(c_plusplus)
|
||||
|
@ -709,6 +709,78 @@ RemoveSessionTokenEntryInCache(
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
void
|
||||
DeleteAuthTokenEntriesInCache(
|
||||
IN void *pCredStoreScope
|
||||
)
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
// Notes:
|
||||
//
|
||||
// L2
|
||||
//=======================================================================--
|
||||
{
|
||||
int32_t miCasaStatus;
|
||||
SSCS_SECRET_ID_T sharedId = {27, "CASA_AUTHENTICATION_TOKENS"};
|
||||
|
||||
DbgTrace(1, "-DeleteAuthTokenEntriesInCache- Start\n", 0);
|
||||
|
||||
// Remove all of the auth tokens from the cache
|
||||
miCasaStatus = miCASARemoveCredential(0,
|
||||
&sharedId,
|
||||
(SSCS_SECRET_ID_T*) NULL,
|
||||
(SSCS_EXT_T*) pCredStoreScope);
|
||||
if (miCasaStatus != NSSCS_SUCCESS)
|
||||
{
|
||||
DbgTrace(0, "-DeleteAuthTokenEntriesInCache- miCASADeleteCredential error = %0X\n", miCasaStatus);
|
||||
}
|
||||
|
||||
DbgTrace(1, "-DeleteAuthTokenEntriesInCache- End\n", 0);
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
void
|
||||
DeleteSessionTokenEntriesInCache(
|
||||
IN void *pCredStoreScope
|
||||
)
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
// Notes:
|
||||
//
|
||||
// L2
|
||||
//=======================================================================--
|
||||
{
|
||||
int32_t miCasaStatus;
|
||||
SSCS_SECRET_ID_T sharedId = {20, "CASA_SESSION_TOKENS"};
|
||||
|
||||
DbgTrace(1, "-DeleteSessionTokenEntriesInCache- Start\n", 0);
|
||||
|
||||
// Remove all of the auth tokens from the cache
|
||||
miCasaStatus = miCASARemoveCredential(0,
|
||||
&sharedId,
|
||||
(SSCS_SECRET_ID_T*) NULL,
|
||||
(SSCS_EXT_T*) pCredStoreScope);
|
||||
if (miCasaStatus != NSSCS_SUCCESS)
|
||||
{
|
||||
DbgTrace(0, "-DeleteSessionTokenEntriesInCache- miCASADeleteCredential error = %0X\n", miCasaStatus);
|
||||
}
|
||||
|
||||
DbgTrace(1, "-DeleteSessionTokenEntriesInCache- End\n", 0);
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
CasaStatus
|
||||
InitializeAuthCache()
|
||||
|
@ -833,6 +833,101 @@ ObtainAuthToken(
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
void
|
||||
CleanUpAuthTokenCacheInt(
|
||||
IN const void *pCredStoreScope)
|
||||
//
|
||||
// Arguments:
|
||||
// pCredStoreScope -
|
||||
// Pointer to CASA structure for scoping credential store access
|
||||
// to specific users. This can only be leveraged by applications
|
||||
// running in the context of System.
|
||||
//
|
||||
// Returns:
|
||||
// Nothing
|
||||
//
|
||||
// Description:
|
||||
// Flush the AuthToken cache.
|
||||
//=======================================================================--
|
||||
{
|
||||
CasaStatus retStatus;
|
||||
HANDLE hUserMutex = NULL;
|
||||
|
||||
DbgTrace(1, "-CleanUpAuthTokenCacheInt- Start\n", 0);
|
||||
|
||||
// Obtain our synchronization mutex
|
||||
AcquireModuleMutex;
|
||||
|
||||
// Create user synchronization mutex
|
||||
retStatus = CreateUserMutex(&hUserMutex);
|
||||
if (retStatus != CASA_STATUS_SUCCESS)
|
||||
{
|
||||
DbgTrace(0, "-CleanUpAuthTokenCacheInt- Error creating mutex for the user\n", 0);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Make sure we are fully initialized
|
||||
if (g_bInitialized == false)
|
||||
{
|
||||
retStatus = InitializeLibrary();
|
||||
|
||||
if (retStatus == CASA_STATUS_SUCCESS)
|
||||
{
|
||||
g_bInitialized = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Release our synchronization mutex
|
||||
ReleaseModuleMutex;
|
||||
|
||||
// Start user process synchronization
|
||||
AcquireUserMutex(hUserMutex);
|
||||
|
||||
// Delete all of the tokens in our cache
|
||||
DeleteAuthTokenEntriesInCache(pCredStoreScope);
|
||||
DeleteSessionTokenEntriesInCache(pCredStoreScope);
|
||||
|
||||
// Stop user process synchronization
|
||||
ReleaseUserMutex(hUserMutex);
|
||||
|
||||
exit:
|
||||
|
||||
if (hUserMutex != NULL)
|
||||
{
|
||||
DestroyUserMutex(hUserMutex);
|
||||
}
|
||||
|
||||
DbgTrace(1, "-CleanUpAuthTokenCacheInt- End\n", 0);
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
void SSCS_CALL
|
||||
CleanUpAuthTokenCache(void)
|
||||
//
|
||||
// Arguments: None.
|
||||
//
|
||||
// Returns:
|
||||
// Nothing
|
||||
//
|
||||
// Description:
|
||||
// Flush the AuthToken cache.
|
||||
//=======================================================================--
|
||||
{
|
||||
DbgTrace(1, "-CleanUpAuthTokenCache- Start\n", 0);
|
||||
|
||||
// Call our internal worker
|
||||
CleanUpAuthTokenCacheInt(NULL);
|
||||
|
||||
DbgTrace(1, "-CleanUpAuthTokenCache- End\n", 0);
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
int
|
||||
InitializeLibrary(void)
|
||||
|
@ -299,6 +299,16 @@ RemoveSessionTokenEntryInCache(
|
||||
IN const char *pCacheKey,
|
||||
IN void *pCredStoreScope);
|
||||
|
||||
extern
|
||||
void
|
||||
DeleteAuthTokenEntriesInCache(
|
||||
IN void *pCredStoreScope);
|
||||
|
||||
extern
|
||||
void
|
||||
DeleteSessionTokenEntriesInCache(
|
||||
IN void *pCredStoreScope);
|
||||
|
||||
extern
|
||||
CasaStatus
|
||||
InitializeAuthCache(void);
|
||||
|
@ -167,6 +167,10 @@ int main(int argc, char* argv[])
|
||||
printf("Press 'Enter' to run test or 'n + Enter' to stop.\n");
|
||||
}
|
||||
|
||||
// Cleanup the AuthToken cache to start clean the next time that
|
||||
// we run the test application.
|
||||
CleanUpAuthTokenCache();
|
||||
|
||||
// Close winsock
|
||||
WSACleanup();
|
||||
}
|
||||
|
@ -8,4 +8,6 @@ EXPORTS
|
||||
; DllGetClassObject PRIVATE
|
||||
ObtainAuthToken PRIVATE
|
||||
ObtainAuthTokenEx PRIVATE
|
||||
CleanUpAuthTokenCache PRIVATE
|
||||
CleanUpAuthTokenCacheEx PRIVATE
|
||||
; DllCanUnloadNow PRIVATE
|
@ -68,7 +68,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="false"
|
||||
AdditionalOptions="/EXPORT:ObtainAuthToken /EXPORT:ObtainAuthTokenEx"
|
||||
AdditionalOptions="/EXPORT:ObtainAuthToken /EXPORT:ObtainAuthTokenEx /EXPORT:CleanUpAuthTokenCache /EXPORT:CleanUpAuthTokenCacheEx"
|
||||
AdditionalDependencies="ws2_32.lib winhttp.lib libexpatmt.lib micasa.lib shlwapi.lib"
|
||||
OutputFile="$(OutDir)/casa_authtoken.dll"
|
||||
LinkIncremental="1"
|
||||
@ -107,6 +107,90 @@
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\windows\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\windows\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "XML_STATIC" /D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories=".;..\;..\..\include;..\..\include\windows;"$(MS_SDK_DIR)\include";"$(CASA32_SDK_DIR)\include";"..\..\..\..\..\Expat-2.0.0\Source\lib""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/EXPORT:ObtainAuthToken /EXPORT:ObtainAuthTokenEx /EXPORT:CleanUpAuthTokenCache /EXPORT:CleanUpAuthTokenCacheEx"
|
||||
AdditionalDependencies="ws2_32.lib winhttp.lib libexpatmt.lib micasa.lib shlwapi.lib"
|
||||
OutputFile="$(OutDir)/casa_authtoken.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(MS_SDK_DIR)\lib";"$(CASA32_SDK_DIR)\lib";"..\..\..\..\..\Expat-2.0.0\StaticLibs""
|
||||
IgnoreDefaultLibraryNames="libc"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="0"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(SolutionDir)lib\windows\$(TargetName).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
@ -198,90 +282,6 @@
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\windows\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\windows\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "XML_STATIC" /D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories=".;..\;..\..\include;..\..\include\windows;"$(MS_SDK_DIR)\include";"$(CASA32_SDK_DIR)\include";"..\..\..\..\..\Expat-2.0.0\Source\lib""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/EXPORT:ObtainAuthToken /EXPORT:ObtainAuthTokenEx"
|
||||
AdditionalDependencies="ws2_32.lib winhttp.lib libexpatmt.lib micasa.lib shlwapi.lib"
|
||||
OutputFile="$(OutDir)/casa_authtoken.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(MS_SDK_DIR)\lib";"$(CASA32_SDK_DIR)\lib";"..\..\..\..\..\Expat-2.0.0\StaticLibs""
|
||||
IgnoreDefaultLibraryNames="libc"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="0"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(SolutionDir)lib\windows\$(TargetName).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
|
@ -122,6 +122,33 @@ ObtainAuthTokenEx(
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
void SSCS_CALL
|
||||
CleanUpAuthTokenCacheEx(
|
||||
IN const void *pCredStoreScope)
|
||||
//
|
||||
// Arguments:
|
||||
// pCredStoreScope -
|
||||
// Pointer to CASA structure for scoping credential store access
|
||||
// to specific users. This can only be leveraged by applications
|
||||
// running in the context of System.
|
||||
//
|
||||
// Returns:
|
||||
// Nothing
|
||||
//
|
||||
// Description:
|
||||
// Flush the AuthToken cache.
|
||||
//=======================================================================--
|
||||
{
|
||||
DbgTrace(1, "-CleanUpAuthTokenCacheEx- Start\n", 0);
|
||||
|
||||
// Call our internal worker
|
||||
CleanUpAuthTokenCacheInt(pCredStoreScope);
|
||||
|
||||
DbgTrace(1, "-CleanUpAuthTokenCacheEx- End\n", 0);
|
||||
}
|
||||
|
||||
|
||||
//++=======================================================================
|
||||
BOOL APIENTRY DllMain(
|
||||
HANDLE hModule,
|
||||
|
Loading…
Reference in New Issue
Block a user