C# 클래스 Examples.ExampleControlAuthenticationHandler

Implementation of IControlAuthenticationHandler.
상속: IControlAuthenticationHandler
파일 보기 프로젝트 열기: pushtechnology/diffusion-examples

공개 메소드들

메소드 설명
Authenticate ( string principal, ICredentials credentials, ISessionDetails sessionDetails, IAuthenticationHandlerCallback callback ) : void

Request authentication. The server calls this to authenticate new sessions, and when a client requests the session principal is changed. For each call to Authenticate, 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.

OnActive ( IRegisteredHandler registeredHandler ) : void

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.

OnClose ( ) : void

Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.

메소드 상세

Authenticate() 공개 메소드

Request authentication. The server calls this to authenticate new sessions, and when a client requests the session principal is changed. For each call to Authenticate, 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.
public Authenticate ( string principal, ICredentials credentials, ISessionDetails sessionDetails, IAuthenticationHandlerCallback callback ) : void
principal string
credentials ICredentials
sessionDetails ISessionDetails
callback IAuthenticationHandlerCallback
리턴 void

OnActive() 공개 메소드

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.
public OnActive ( IRegisteredHandler registeredHandler ) : void
registeredHandler IRegisteredHandler
리턴 void

OnClose() 공개 메소드

Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.
public OnClose ( ) : void
리턴 void