SspiEncodeAuthIdentityAsStrings function
Encodes the specified authentication identity as three strings.
Syntax
SECURITY_STATUS SspiEncodeAuthIdentityAsStrings( _In_ PSEC_WINNT_AUTH_IDENTITY_OPAQUE pAuthIdentity, _Out_ PCWSTR *ppszUserName, _Out_ PCWSTR *ppszDomainName, _Out_ PCWSTR *ppszPackedCredentialsString );
Parameters
- pAuthIdentity [in]
-
The credential structure to be encoded.
- ppszUserName [out]
-
The marshaled user name of the identity specified by the pAuthIdentity parameter.
When you have finished using this string, free it by calling the SspiFreeAuthIdentity function.
- ppszDomainName [out]
-
The marshaled domain name of the identity specified by the pAuthIdentity parameter.
When you have finished using this string, free it by calling the SspiFreeAuthIdentity function.
- ppszPackedCredentialsString [out]
-
An encoded string version of a SEC_WINNT_AUTH_IDENTITY_EX2 structure that specifies the users credentials.
When you have finished using this string, 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. Possible values include, but are not limited to, those in the following table.
| Return code/value | Description |
|---|---|
|
The SEC_WINNT_AUTH_IDENTITY_FLAGS_PROCESS_ENCRYPTED flag is set in the identity structure specified by the pAuthIdentity parameter. |
Requirements
|
Minimum supported client |
Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
SspiEncodeAuthIdentityAsStringsW (Unicode) and SspiEncodeAuthIdentityAsStringsA (ANSI) |