Interface IAuthenticationControl

The authentication control feature that allows a client session to authenticate the credentials of other sessions.

Inherited Members
IFeature.Session
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Clients
Assembly: Diffusion.Client.dll
Syntax
public interface IAuthenticationControl : IFeature
Remarks

Access control

In order to register an authentication handler a session needs both REGISTER_HANDLER and AUTHENTICATE permissions.

Accessing the feature

This feature may be obtained from a ISession with the AuthenticationControl property.

Methods

SetAuthenticationHandlerAsync(String, IControlAuthenticator)

Registers an authentication handler for client authentication events.

Declaration
Task<IRegistration> SetAuthenticationHandlerAsync(string handlerName, IControlAuthenticator authenticator)
Parameters
Type Name Description
String handlerName

The handler name which must match an entry in the server's security configuration.

IControlAuthenticator authenticator

The authentication handler.

Returns
Type Description
Task<IRegistration>

The Task representing the current operation.

Remarks

If the task completes successfully, the Task result will be IRegistration which can be used to unregister the authentication handler.

Exceptions
Type Condition
SessionException

The server configuration does not contain a control-authentication-handler element with the given handlerName. Thrown by the returned Task.

SessionSecurityException

The calling session does not have the REGISTER_HANDLER or AUTHENTICATE permission. Thrown by the returned Task.

SessionClosedException

The session is closed. Thrown by the returned Task.

SetAuthenticationHandlerAsync(String, IControlAuthenticator, CancellationToken)

Registers an authentication handler for client authentication events.

Declaration
Task<IRegistration> SetAuthenticationHandlerAsync(string handlerName, IControlAuthenticator authenticator, CancellationToken cancellationToken)
Parameters
Type Name Description
String handlerName

The handler name which must match an entry in the server's security configuration.

IControlAuthenticator authenticator

The authentication handler.

CancellationToken cancellationToken

The cancellation token used to cancel the current operation.

Returns
Type Description
Task<IRegistration>

The Task representing the current operation.

Remarks

If the task completes successfully, the Task result will be IRegistration which can be used to unregister the authentication handler.

Exceptions
Type Condition
SessionException

The server configuration does not contain a control-authentication-handler element with the given handlerName. Thrown by the returned Task.

SessionSecurityException

The calling session does not have the REGISTER_HANDLER or AUTHENTICATE permission. Thrown by the returned Task.

SessionClosedException

The session is closed. Thrown by the returned Task.

Back to top