ITSGAuthenticateUserSink::OnUserAuthenticated method (tsgauthenticationengine.h)
Notifies Remote Desktop Gateway (RD Gateway) that the authentication plug-in has successfully authenticated the user.
Syntax
HRESULT OnUserAuthenticated(
[in] BSTR userName,
[in] BSTR userDomain,
[in] ULONG_PTR context,
[in, optional] HANDLE_PTR userToken
);
Parameters
[in] userName
The name of the user who initiated the connection.
[in] userDomain
The domain of the user who initiated the connection.
[in] context
A pointer to a ULONG that contains a value that identifies this connection. Use the value that was passed by the AuthenticateUser method.
[in, optional] userToken
A pointer to a HANDLE that specifies the user token of the user. If the user is not running Windows, set this parameter to NULL.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
You can call this method from your implementation of AuthenticateUser. If authentication requires more than 1 second, we recommend launching a separate thread to perform authentication.
For a sample that uses the OnUserAuthenticated 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 |