Platform SDK: Logon Authentication

ApplyControlToken

The ApplyControlToken function provides a way to apply a control token to a security context. A token can be received when the security context is being established by a call to InitializeSecurityContext or with a per-message security service such as verify or unseal.

This function allows additional or replacement tokens to be applied to a context.

SECURITY_STATUS ApplyControlToken(
  PCtxtHandle phContext, // handle of the context to modify
  PSecBufferDesc pInput  // input token to apply
);

Parameters

phContext
[in] Handle to the context to which the token is applied.
pInput
[in] Pointer to a SecBufferDesc structure with a pointer to a SecBuffer structure that contains the input token to apply to the context.

Return Values

If the function succeeds, the return value is SEC_E_OK.

If the function fails, the return value is a nonzero error code.

Remarks

The ApplyControlToken function can modify the context based on this token.

The prototype for this function can be found in Sspi.h.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Sspi.h; include Security.h.
  Library: Use Secur32.lib.

See Also

ImpersonateSecurityContext, InitializeSecurityContext, SecBuffer, SecBufferDesc