Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SspiEncodeStringsAsAuthIdentity function (sspi.h)

Encodes a set of three credential strings as an authentication identity structure.

Syntax

SECURITY_STATUS SEC_ENTRY SspiEncodeStringsAsAuthIdentity(
 [in] PCWSTR pszUserName,
 [in] PCWSTR pszDomainName,
 [in] PCWSTR pszPackedCredentialsString,
 [out] PSEC_WINNT_AUTH_IDENTITY_OPAQUE *ppAuthIdentity
);

Parameters

[in] pszUserName

The user name associated with the identity to encode.

[in] pszDomainName

The domain name associated with the identity to encode.

[in] pszPackedCredentialsString

An encoded string version of a SEC_WINNT_AUTH_IDENTITY_EX2 structure that specifies the user's credentials.

[out] ppAuthIdentity

A pointer to the encoded identity structure.

When you have finished using this structure, free it by calling the SspiFreeAuthIdentity function.

Return value

If the function succeeds, it returns SEC_E_OK.

If the function fails, it returns a nonzero error code.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header sspi.h
Library Secur32.lib
DLL SspiCli.dll

Feedback

Was this page helpful?

Additional resources