Interface IAuthenticationHandler
The authentication handler.
Namespace: PushTechnology.ClientInterface.Client.Security.Authentication
Assembly: Diffusion.Client.dll
Syntax
public interface IAuthenticationHandler
Remarks
Deprecated: This interface has been replaced by the IAuthenticator interface. New authentication handlers should implement IAuthenticator. This interface will be removed in a future release.
Authentication handlers implementing this interface can be registered with the server. The server calls the authentication handlers when a client application creates a session, or changes the principal associated with a session, allowing the handler to veto individual requests.
Authentication handlers are configured in precedence order. Authentication will succeed if a handler returns Allow() and all higher precedence handlers (earlier in the order) return Abstain(). Authentication will fail if a handler returns Deny() and all higher precedence handlers return Abstain(). If all authentication handlers return Abstain(), the request will be denied. Once the outcome is known, the server may choose not to call the remaining handlers.
The special variant of Allow(IAuthenticationResult) may be used by the handler to supply the server with additional information that is used to set up the session.
Methods
Authenticate(String, ICredentials, ISessionDetails, IAuthenticationHandlerCallback)
Requests authentication.
Declaration
void Authenticate(string principal, ICredentials credentials, ISessionDetails sessionDetails, IAuthenticationHandlerCallback callback)
Parameters
Type | Name | Description |
---|---|---|
String | principal | The requested principal name, or |
ICredentials | credentials | The credentials to authenticate the given |
ISessionDetails | sessionDetails | The information the server has about the client. |
IAuthenticationHandlerCallback | callback | The single-use authentication callback. |
Remarks
The server calls this to authenticate new sessions, and when a client requests the session principal to be changed (for example, using ChangePrincipalAsync(String, ICredentials)).
For each call to this method, the authentication handler should respond by calling one of the methods of
the provided callback
. The handler may return immediately and process the authentication
request asynchronously. The client session will be blocked until a callback method is called.