Class CompositeControlAuthenticationHandler
The CompositeAuthenticationHandler that implements IControlAuthenticationHandler.
Inherited Members
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Clients
Assembly: Diffusion.Client.dll
Syntax
public class CompositeControlAuthenticationHandler : CompositeAuthenticationHandler, IControlAuthenticationHandler, IAuthenticationHandler, IServerHandler
Remarks
Deprecated: IAuthenticationHandler has been replaced by the IAuthenticator interface. New authentication handlers should implement IControlAuthenticator. This class will be removed in a future release.
This class is useful when there are several steps to authentication implemented as discrete authentication handlers. Using a CompositeAuthenticationHandler is better than configuring separate IControlAuthenticationHandler instances and registering the discrete handlers individually because it reduces communication between the server and the client.
The OnActive(IRegisteredHandler) and OnClose() notifications will be forwarded to all of the discrete handlers. If a discrete handler throws an exception then the exception will be propagated after all discrete handlers have been notified.
The Authenticate(String, ICredentials, ISessionDetails, IAuthenticationHandlerCallback) method will be called on the discrete handlers in order until a handler either allows or denies the connection. The next handler is only called once the preceding one uses the callback to abstain. If an exception is thrown it is not propagated and is treated in the same way as calling deny on the callback.
Constructors
CompositeControlAuthenticationHandler(List<IAuthenticationHandler>)
Initializes a new CompositeControlAuthenticationHandler instance.
Declaration
public CompositeControlAuthenticationHandler(List<IAuthenticationHandler> handlers)
Parameters
Type | Name | Description |
---|---|---|
List<IAuthenticationHandler> | handlers | The authentication handlers. |
CompositeControlAuthenticationHandler(IAuthenticationHandler[])
Initializes a new CompositeControlAuthenticationHandler instance.
Declaration
public CompositeControlAuthenticationHandler(params IAuthenticationHandler[] handlers)
Parameters
Type | Name | Description |
---|---|---|
IAuthenticationHandler[] | handlers | The variable-length list of handlers. |
Methods
OnActive(IRegisteredHandler)
Called when the handler has been registered at the server and is now active.
A session can register at most one a single handler of each type. If there is already a handler registered for the topic path the operation will fail, the registered handler will be closed, and the session error handler will be notified. To change the handler, first close the previous handler.
Declaration
public virtual void OnActive(IRegisteredHandler registeredHandler)
Parameters
Type | Name | Description |
---|---|---|
IRegisteredHandler | registeredHandler |
OnClose()
Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.
Declaration
public virtual void OnClose()