Platform SDK: Logon Authentication

Context Management

SSPI context management functions create and use security contexts.

In a communication link, the client and server cooperate to create a shared security context. The client and server both use the security context with message support functions to ensure message integrity and privacy during the connection.

Security contexts are opaque security objects. Information in the security context is not available to the application. Context management functions create and use context handles and the security package de-references the context handle to access its security content.

A context handle is a 64 bit value between {0x00000000, 0x0000000} and {0xFFFFFFFF, 0xFFFFFFFE}.

The following functions are used with context management.

Function Description
AcceptSecurityContext Used by a server to creates a security context based on an opaque message received from a client.
ApplyControlToken Applies a supplemental security message to an existing security context.
CompleteAuthToken Completes an authentication token. This function is used by protocols such as DCE that need to revise the security information after the transport application has updated some message parameters.
DeleteSecurityContext Frees a security context and associated resources.
FreeContextBuffer Frees a memory buffer allocated by a security package.
ImpersonateSecurityContext Impersonates the security context to appear as the client to the system.
InitializeSecurityContext Used by a client to initiates a security context by generating an opaque message to be passed to a server.
QueryContextAttributes Queries the attributes of a security context.
QuerySecurityContextToken Obtains the impersonation token for a security context for direct manipulation.
RevertSecurityContext Ceases impersonating a security context.