ITSGAuthenticationEngine::AuthenticateUser method (tsgauthenticationengine.h)
Authenticates a user.
Remote Desktop Gateway (RD Gateway) calls this method when it receives a new connection request. The authentication plug-in should authenticate the user based on the cookie referenced by the cookieData parameter. The authentication plug-in should then use the ITSGAuthenticateUserSink interface to notify RD Gateway about the result of authentication.
Syntax
HRESULT AuthenticateUser(
[in] GUID mainSessionId,
[in] BYTE *cookieData,
[in] ULONG numCookieBytes,
[in] ULONG_PTR context,
[in] ITSGAuthenticateUserSink *pSink
);
Parameters
[in] mainSessionId
A unique identifier assigned to the connection request by RD Gateway.
[in] cookieData
A pointer to a BYTE that contains the cookie provided by the user.
[in] numCookieBytes
The number of bytes referenced by the cookieData parameter.
[in] context
A pointer to a ULONG that contains a value specific to this connection. This value should be passed back to RD Gateway by using the methods of the ITSGAuthenticateUserSink interface.
[in] pSink
A pointer to a ITSGAuthenticateUserSink interface that the authentication plug-in must use to notify RD Gateway about the result of authentication.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
If this method returns S_OK, RD Gateway waits for the authentication plug-in to call a method of the ITSGAuthenticateUserSink interface. If any other value is returned, RD Gateway immediately denies the connection request.
For a sample that uses the AuthenticateUser method, see the Remote Desktop Gateway Pluggable Authentication and Authorization sample.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 |
Minimum supported server | Windows Server 2008 R2 |
Target Platform | Windows |
Header | tsgauthenticationengine.h |